Class: User
- Inherits:
-
Object
- Object
- User
- Defined in:
- lib/papercall/models/user.rb
Instance Attribute Summary collapse
-
#avatar ⇒ Object
readonly
Returns the value of attribute avatar.
-
#email ⇒ Object
readonly
Returns the value of attribute email.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(json_hash) ⇒ User
constructor
A new instance of User.
Constructor Details
#initialize(json_hash) ⇒ User
Returns a new instance of User.
5 6 7 8 9 |
# File 'lib/papercall/models/user.rb', line 5 def initialize(json_hash) @name = json_hash[:name] @avatar = json_hash[:avatar] @email = json_hash[:email] end |
Instance Attribute Details
#avatar ⇒ Object (readonly)
Returns the value of attribute avatar.
3 4 5 |
# File 'lib/papercall/models/user.rb', line 3 def avatar @avatar end |
#email ⇒ Object (readonly)
Returns the value of attribute email.
3 4 5 |
# File 'lib/papercall/models/user.rb', line 3 def email @email end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/papercall/models/user.rb', line 3 def name @name end |