Class: Moviemeter::Image

Inherits:
Object
  • Object
show all
Defined in:
lib/moviemeter/image.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(values) ⇒ Image

Returns a new instance of Image.



5
6
7
8
9
10
11
# File 'lib/moviemeter/image.rb', line 5

def initialize(values)
	@type = values[0]
	@width = values[1]['width'].to_i
	@height = values[1]['height'].to_i
	@filetype = values[1]['filetype']
	@encoded_contents = values[1]['base64_encoded_contents']
end

Instance Attribute Details

#encoded_contentsObject (readonly)

Returns the value of attribute encoded_contents.



3
4
5
# File 'lib/moviemeter/image.rb', line 3

def encoded_contents
  @encoded_contents
end

#filetypeObject (readonly)

Returns the value of attribute filetype.



3
4
5
# File 'lib/moviemeter/image.rb', line 3

def filetype
  @filetype
end

#heightObject (readonly)

Returns the value of attribute height.



3
4
5
# File 'lib/moviemeter/image.rb', line 3

def height
  @height
end

#typeObject (readonly)

Returns the value of attribute type.



3
4
5
# File 'lib/moviemeter/image.rb', line 3

def type
  @type
end

#widthObject (readonly)

Returns the value of attribute width.



3
4
5
# File 'lib/moviemeter/image.rb', line 3

def width
  @width
end