Guest User

Untitled

a guest
Sep 21st, 2018
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. class User
  2.  
  3. attr_accessor :username, :password, :email
  4.  
  5. def initialize(options = {})
  6. hash = {username: 'name', password: 'password', email: "#{username}@#{domain_name}"}
  7. hash.merge!(options)
  8. hash.each {|name, value| instance_variable_set("@#{name}", value)}
  9. end
  10.  
  11. end
Add Comment
Please, Sign In to add comment