Class: FlickrOfflineGallery::PhotoSize
- Inherits:
-
Object
- Object
- FlickrOfflineGallery::PhotoSize
- Defined in:
- lib/flickr_offline_gallery/photo_size.rb
Instance Attribute Summary collapse
-
#height ⇒ Object
readonly
Returns the value of attribute height.
-
#label ⇒ Object
readonly
Returns the value of attribute label.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
-
#width ⇒ Object
readonly
Returns the value of attribute width.
Instance Method Summary collapse
-
#initialize(flickraw_response) ⇒ PhotoSize
constructor
A new instance of PhotoSize.
- #key ⇒ Object
Constructor Details
#initialize(flickraw_response) ⇒ PhotoSize
Returns a new instance of PhotoSize.
6 7 8 9 10 11 |
# File 'lib/flickr_offline_gallery/photo_size.rb', line 6 def initialize(flickraw_response) @label = flickraw_response.label @height = flickraw_response.height @width = flickraw_response.width @url = flickraw_response.source end |
Instance Attribute Details
#height ⇒ Object (readonly)
Returns the value of attribute height.
4 5 6 |
# File 'lib/flickr_offline_gallery/photo_size.rb', line 4 def height @height end |
#label ⇒ Object (readonly)
Returns the value of attribute label.
4 5 6 |
# File 'lib/flickr_offline_gallery/photo_size.rb', line 4 def label @label end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
4 5 6 |
# File 'lib/flickr_offline_gallery/photo_size.rb', line 4 def url @url end |
#width ⇒ Object (readonly)
Returns the value of attribute width.
4 5 6 |
# File 'lib/flickr_offline_gallery/photo_size.rb', line 4 def width @width end |
Instance Method Details
#key ⇒ Object
13 14 15 |
# File 'lib/flickr_offline_gallery/photo_size.rb', line 13 def key label.downcase.gsub(" ", "_") end |