Class: Rb::Lomo::User
- Inherits:
-
Object
- Object
- Rb::Lomo::User
- Defined in:
- lib/rb-lomo/user.rb
Instance Attribute Summary collapse
-
#avatar ⇒ Object
readonly
Returns the value of attribute avatar.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
-
#username ⇒ Object
readonly
Returns the value of attribute username.
Instance Method Summary collapse
-
#initialize(json_object) ⇒ User
constructor
A new instance of User.
Constructor Details
#initialize(json_object) ⇒ User
Returns a new instance of User.
11 12 13 14 15 |
# File 'lib/rb-lomo/user.rb', line 11 def initialize json_object @username = json_object['username'] @url = json_object['url'] @avatar = Avatar.new json_object['avatar'] end |
Instance Attribute Details
#avatar ⇒ Object (readonly)
Returns the value of attribute avatar.
9 10 11 |
# File 'lib/rb-lomo/user.rb', line 9 def avatar @avatar end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
7 8 9 |
# File 'lib/rb-lomo/user.rb', line 7 def url @url end |
#username ⇒ Object (readonly)
Returns the value of attribute username.
5 6 7 |
# File 'lib/rb-lomo/user.rb', line 5 def username @username end |