Class: LoginPrompt::User
- Inherits:
-
Object
- Object
- LoginPrompt::User
- Defined in:
- lib/loginprompt.rb
Overview
Simple user model
Instance Attribute Summary collapse
-
#email ⇒ Object
Returns the value of attribute email.
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(hash) ⇒ User
constructor
A new instance of User.
Constructor Details
#initialize(hash) ⇒ User
Returns a new instance of User.
17 18 19 20 21 |
# File 'lib/loginprompt.rb', line 17 def initialize(hash) hash.each do |k, v| self.send("#{k}=", v) end end |
Instance Attribute Details
#email ⇒ Object
Returns the value of attribute email.
15 16 17 |
# File 'lib/loginprompt.rb', line 15 def email @email end |
#id ⇒ Object
Returns the value of attribute id.
15 16 17 |
# File 'lib/loginprompt.rb', line 15 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
15 16 17 |
# File 'lib/loginprompt.rb', line 15 def name @name end |