Skip to content

Instantly share code, notes, and snippets.

@ivanoats
Created May 22, 2013 00:01
Show Gist options
  • Save ivanoats/5624287 to your computer and use it in GitHub Desktop.
Save ivanoats/5624287 to your computer and use it in GitHub Desktop.
require 'securerandom'
require 'ostruct'
emails = ["a@b.c","d@e.f","g@h.k"]
people = []
emails.each do |email|
person = OpenStruct.new
person.email = email
person.password = SecureRandom.base64(8)
people << person
end
people.each do |person|
puts "Person's email is #{person.email}"
puts "Person's password is #{person.password}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment