Class: Rb::Lomo::Avatar
- Inherits:
-
Object
- Object
- Rb::Lomo::Avatar
- Defined in:
- lib/rb-lomo/user.rb
Instance Attribute Summary collapse
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(json_object) ⇒ Avatar
constructor
A new instance of Avatar.
- #size ⇒ Object
Constructor Details
#initialize(json_object) ⇒ Avatar
Returns a new instance of Avatar.
22 23 24 25 26 |
# File 'lib/rb-lomo/user.rb', line 22 def initialize json_object @url = json_object['url'] @width = json_object['width'] @height= json_object['height'] end |
Instance Attribute Details
#url ⇒ Object (readonly)
Returns the value of attribute url.
20 21 22 |
# File 'lib/rb-lomo/user.rb', line 20 def url @url end |
Instance Method Details
#size ⇒ Object
28 29 30 31 32 33 |
# File 'lib/rb-lomo/user.rb', line 28 def size { width: @width, height: @height } end |