Class: HTTPThumbnailerClient::Thumbnail

Inherits:
Object
  • Object
show all
Defined in:
lib/httpthumbnailer-client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#dataObject (readonly)

Returns the value of attribute data.



73
74
75
# File 'lib/httpthumbnailer-client.rb', line 73

def data
  @data
end

#heightObject (readonly)

Returns the value of attribute height.



72
73
74
# File 'lib/httpthumbnailer-client.rb', line 72

def height
  @height
end

#mime_typeObject (readonly)

Returns the value of attribute mime_type.



70
71
72
# File 'lib/httpthumbnailer-client.rb', line 70

def mime_type
  @mime_type
end

#widthObject (readonly)

Returns the value of attribute width.



71
72
73
# File 'lib/httpthumbnailer-client.rb', line 71

def width
  @width
end