Class: Nineflats::Photo
Instance Attribute Summary collapse
-
#caption ⇒ Object
Returns the value of attribute caption.
-
#title ⇒ Object
Returns the value of attribute title.
-
#url ⇒ Object
Returns the value of attribute url.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(json) ⇒ Photo
constructor
A new instance of Photo.
Methods inherited from Base
client_app_key, client_app_key=, object_link
Constructor Details
#initialize(json) ⇒ Photo
Returns a new instance of Photo.
5 6 7 8 9 10 11 12 |
# File 'lib/nineflats-api/photo.rb', line 5 def initialize(json) @raw_data = json photo = json.first[1] @title = photo["title"] @caption = photo["caption"] @url = photo["url"] end |
Instance Attribute Details
#caption ⇒ Object
Returns the value of attribute caption.
3 4 5 |
# File 'lib/nineflats-api/photo.rb', line 3 def @caption end |
#title ⇒ Object
Returns the value of attribute title.
3 4 5 |
# File 'lib/nineflats-api/photo.rb', line 3 def title @title end |
#url ⇒ Object
Returns the value of attribute url.
3 4 5 |
# File 'lib/nineflats-api/photo.rb', line 3 def url @url end |