Class: Prettyusers::User

Inherits:
Object
  • Object
show all
Defined in:
lib/prettyusers.rb

Constant Summary collapse

@@fields =
[
  :gender,
  :username,
  :title,
  :name,
  :location,
  :email,
  :password,
  :md5_password,
  :sha1_hash,
  :phone,
  :cell,
  :SSN,
  :picture
]

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ User

Returns a new instance of User.



27
28
29
30
31
# File 'lib/prettyusers.rb', line 27

def initialize(attributes = {})
    attributes.each do |k,v|
      instance_variable_set("@#{k}", v) unless v.nil?
    end
end