Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class User
- attr_accessor :username, :password, :email
- def initialize(options = {})
- hash = {username: 'name', password: 'password', email: "#{username}@#{domain_name}"}
- hash.merge!(options)
- hash.each {|name, value| instance_variable_set("@#{name}", value)}
- end
- end
Add Comment
Please, Sign In to add comment