Class: Fotolia::Medium::Thumbnail
- Inherits:
-
Object
- Object
- Fotolia::Medium::Thumbnail
- Defined in:
- lib/fotolia/medium.rb
Overview
A thumbnail attached to a Medium object. Just holds its url, width, height and an html tag to include it on web pages.
Instance Attribute Summary collapse
-
#height ⇒ Object
readonly
Returns the value of attribute height.
-
#html_tag ⇒ Object
readonly
Returns the value of attribute html_tag.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
-
#width ⇒ Object
readonly
Returns the value of attribute width.
Instance Method Summary collapse
-
#initialize(attributes) ⇒ Thumbnail
constructor
A new instance of Thumbnail.
Constructor Details
#initialize(attributes) ⇒ Thumbnail
Returns a new instance of Thumbnail.
13 14 15 16 17 18 |
# File 'lib/fotolia/medium.rb', line 13 def initialize(attributes) @url = attributes['thumbnail_url'] @html_tag = attributes['thumbnail_html_tag'] @width = attributes['thumbnail_width'] @height = attributes['thumbnail_height'] end |
Instance Attribute Details
#height ⇒ Object (readonly)
Returns the value of attribute height.
11 12 13 |
# File 'lib/fotolia/medium.rb', line 11 def height @height end |
#html_tag ⇒ Object (readonly)
Returns the value of attribute html_tag.
11 12 13 |
# File 'lib/fotolia/medium.rb', line 11 def html_tag @html_tag end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
11 12 13 |
# File 'lib/fotolia/medium.rb', line 11 def url @url end |
#width ⇒ Object (readonly)
Returns the value of attribute width.
11 12 13 |
# File 'lib/fotolia/medium.rb', line 11 def width @width end |