Class: Fotolia::Medium::CompImage
- Inherits:
-
Object
- Object
- Fotolia::Medium::CompImage
- Defined in:
- lib/fotolia/medium.rb
Overview
I never got to know what a CompImage should be, least Fotolia’s API has a method to get one for a medium. So this is a class holding the info that method returns.
Instance Attribute Summary collapse
-
#height ⇒ Object
readonly
Returns the value of attribute height.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
-
#width ⇒ Object
readonly
Returns the value of attribute width.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attributes) ⇒ CompImage
constructor
A new instance of CompImage.
Constructor Details
#initialize(attributes) ⇒ CompImage
Returns a new instance of CompImage.
85 86 87 88 89 |
# File 'lib/fotolia/medium.rb', line 85 def initialize(attributes) @url = attributes['url'] @width = attributes['width'] @height = attributes['height'] end |
Instance Attribute Details
#height ⇒ Object (readonly)
Returns the value of attribute height.
83 84 85 |
# File 'lib/fotolia/medium.rb', line 83 def height @height end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
83 84 85 |
# File 'lib/fotolia/medium.rb', line 83 def url @url end |
#width ⇒ Object (readonly)
Returns the value of attribute width.
83 84 85 |
# File 'lib/fotolia/medium.rb', line 83 def width @width end |