Class: Twitter::Media::Photo
Instance Attribute Summary (collapse)
-
- (Object) display_url
readonly
Returns the value of attribute display_url.
-
- (Object) expanded_url
readonly
Returns the value of attribute expanded_url.
-
- (Object) indices
readonly
Returns the value of attribute indices.
-
- (Object) media_url
readonly
Returns the value of attribute media_url.
-
- (Object) media_url_https
readonly
Returns the value of attribute media_url_https.
-
- (Object) url
readonly
Returns the value of attribute url.
Instance Method Summary (collapse)
-
- (Array<Twitter::Size>) sizes
Returns an array of photo sizes.
Methods inherited from Identity
#==, fetch, #id, #initialize, store
Methods inherited from Base
#[], #attr_equal, attr_reader, #attrs, #attrs_equal, fetch, fetch_or_new, from_response, identity_map, #initialize, store, #update
Constructor Details
This class inherits a constructor from Twitter::Identity
Instance Attribute Details
- (Object) display_url (readonly)
Returns the value of attribute display_url
6 7 8 |
# File 'lib/twitter/media/photo.rb', line 6 def display_url @display_url end |
- (Object) expanded_url (readonly)
Returns the value of attribute expanded_url
6 7 8 |
# File 'lib/twitter/media/photo.rb', line 6 def @expanded_url end |
- (Object) indices (readonly)
Returns the value of attribute indices
6 7 8 |
# File 'lib/twitter/media/photo.rb', line 6 def indices @indices end |
- (Object) media_url (readonly)
Returns the value of attribute media_url
6 7 8 |
# File 'lib/twitter/media/photo.rb', line 6 def media_url @media_url end |
- (Object) media_url_https (readonly)
Returns the value of attribute media_url_https
6 7 8 |
# File 'lib/twitter/media/photo.rb', line 6 def media_url_https @media_url_https end |
- (Object) url (readonly)
Returns the value of attribute url
6 7 8 |
# File 'lib/twitter/media/photo.rb', line 6 def url @url end |
Instance Method Details
- (Array<Twitter::Size>) sizes
Returns an array of photo sizes
12 13 14 15 16 17 |
# File 'lib/twitter/media/photo.rb', line 12 def sizes @sizes ||= Array(@attrs[:sizes]).inject({}) do |object, (key, value)| object[key] = Twitter::Size.fetch_or_new(value) object end end |