Class: HTTPThumbnailerClient::Thumbnail
- Inherits:
-
Object
- Object
- HTTPThumbnailerClient::Thumbnail
- Defined in:
- lib/httpthumbnailer-client.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#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(mime_type, width, height, data) ⇒ Thumbnail
constructor
A new instance of Thumbnail.
Constructor Details
#initialize(mime_type, width, height, data) ⇒ Thumbnail
Returns a new instance of Thumbnail.
61 62 63 64 65 66 67 68 |
# File 'lib/httpthumbnailer-client.rb', line 61 def initialize(mime_type, width, height, data) @mime_type = mime_type @data = data # added to thumbnailer v1.1.0 so may be nil for older server @width = width.to_i if width @height = height.to_i if height end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
73 74 75 |
# File 'lib/httpthumbnailer-client.rb', line 73 def data @data end |
#height ⇒ Object (readonly)
Returns the value of attribute height.
72 73 74 |
# File 'lib/httpthumbnailer-client.rb', line 72 def height @height end |
#mime_type ⇒ Object (readonly)
Returns the value of attribute mime_type.
70 71 72 |
# File 'lib/httpthumbnailer-client.rb', line 70 def mime_type @mime_type end |
#width ⇒ Object (readonly)
Returns the value of attribute width.
71 72 73 |
# File 'lib/httpthumbnailer-client.rb', line 71 def width @width end |