Class: Twitter::Media::Photo
- Inherits:
-
Identity
- Object
- Identity
- Twitter::Media::Photo
- Defined in:
- lib/hackeroo/media/photo.rb
Instance Attribute Summary collapse
-
#display_url ⇒ Object
readonly
Returns the value of attribute display_url.
-
#expanded_url ⇒ Object
readonly
Returns the value of attribute expanded_url.
-
#indices ⇒ Object
readonly
Returns the value of attribute indices.
-
#media_url ⇒ Object
readonly
Returns the value of attribute media_url.
-
#media_url_https ⇒ Object
readonly
Returns the value of attribute media_url_https.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
-
#sizes ⇒ Array<Twitter::Size>
Returns an array of photo sizes.
Instance Attribute Details
#display_url ⇒ Object (readonly)
Returns the value of attribute display_url.
6 7 8 |
# File 'lib/hackeroo/media/photo.rb', line 6 def display_url @display_url end |
#expanded_url ⇒ Object (readonly)
Returns the value of attribute expanded_url.
6 7 8 |
# File 'lib/hackeroo/media/photo.rb', line 6 def @expanded_url end |
#indices ⇒ Object (readonly)
Returns the value of attribute indices.
6 7 8 |
# File 'lib/hackeroo/media/photo.rb', line 6 def indices @indices end |
#media_url ⇒ Object (readonly)
Returns the value of attribute media_url.
6 7 8 |
# File 'lib/hackeroo/media/photo.rb', line 6 def media_url @media_url end |
#media_url_https ⇒ Object (readonly)
Returns the value of attribute media_url_https.
6 7 8 |
# File 'lib/hackeroo/media/photo.rb', line 6 def media_url_https @media_url_https end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
6 7 8 |
# File 'lib/hackeroo/media/photo.rb', line 6 def url @url end |
Instance Method Details
#sizes ⇒ Array<Twitter::Size>
Returns an array of photo sizes
12 13 14 15 16 17 |
# File 'lib/hackeroo/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 |