Class: HTTPThumbnailerClient::ImageID
- Inherits:
-
Object
- Object
- HTTPThumbnailerClient::ImageID
- Defined in:
- lib/httpthumbnailer-client.rb
Instance Attribute Summary collapse
-
#height ⇒ Object
readonly
Returns the value of attribute height.
-
#mime_type ⇒ Object
readonly
Returns the value of attribute mime_type.
-
#width ⇒ Object
readonly
Returns the value of attribute width.
Instance Method Summary collapse
-
#initialize(body) ⇒ ImageID
constructor
A new instance of ImageID.
Constructor Details
#initialize(body) ⇒ ImageID
Returns a new instance of ImageID.
85 86 87 88 89 90 |
# File 'lib/httpthumbnailer-client.rb', line 85 def initialize(body) id = JSON.load(body) @mime_type = id['mimeType'] @width = id['width'] @height = id['height'] end |
Instance Attribute Details
#height ⇒ Object (readonly)
Returns the value of attribute height.
94 95 96 |
# File 'lib/httpthumbnailer-client.rb', line 94 def height @height end |
#mime_type ⇒ Object (readonly)
Returns the value of attribute mime_type.
92 93 94 |
# File 'lib/httpthumbnailer-client.rb', line 92 def mime_type @mime_type end |
#width ⇒ Object (readonly)
Returns the value of attribute width.
93 94 95 |
# File 'lib/httpthumbnailer-client.rb', line 93 def width @width end |