Class: FlickrbCollage::FlickrPhotoUrl
- Inherits:
-
Object
- Object
- FlickrbCollage::FlickrPhotoUrl
- Defined in:
- lib/flickrb_collage/flickr_photo_url.rb
Instance Attribute Summary collapse
-
#flicker ⇒ Object
readonly
Returns the value of attribute flicker.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(id = '', flicker = FlickrConfig.call) ⇒ FlickrPhotoUrl
constructor
A new instance of FlickrPhotoUrl.
Constructor Details
#initialize(id = '', flicker = FlickrConfig.call) ⇒ FlickrPhotoUrl
Returns a new instance of FlickrPhotoUrl.
5 6 7 8 |
# File 'lib/flickrb_collage/flickr_photo_url.rb', line 5 def initialize(id = '', flicker = FlickrConfig.call) @flicker = flicker @id = id end |
Instance Attribute Details
#flicker ⇒ Object (readonly)
Returns the value of attribute flicker.
3 4 5 |
# File 'lib/flickrb_collage/flickr_photo_url.rb', line 3 def flicker @flicker end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
3 4 5 |
# File 'lib/flickrb_collage/flickr_photo_url.rb', line 3 def id @id end |
Instance Method Details
#call ⇒ Object
10 11 12 13 14 |
# File 'lib/flickrb_collage/flickr_photo_url.rb', line 10 def call # Get the last size. Usually, it is the original size. # using fixnum because it doesnt respond to last method. flicker.photos.getSizes(photo_id: id)[-1].source end |