Class: Moviemeter::Image
- Inherits:
-
Object
- Object
- Moviemeter::Image
- Defined in:
- lib/moviemeter/image.rb
Instance Attribute Summary collapse
-
#encoded_contents ⇒ Object
readonly
Returns the value of attribute encoded_contents.
-
#filetype ⇒ Object
readonly
Returns the value of attribute filetype.
-
#height ⇒ Object
readonly
Returns the value of attribute height.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#width ⇒ Object
readonly
Returns the value of attribute width.
Instance Method Summary collapse
-
#initialize(values) ⇒ Image
constructor
A new instance of Image.
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_contents ⇒ Object (readonly)
Returns the value of attribute encoded_contents.
3 4 5 |
# File 'lib/moviemeter/image.rb', line 3 def encoded_contents @encoded_contents end |
#filetype ⇒ Object (readonly)
Returns the value of attribute filetype.
3 4 5 |
# File 'lib/moviemeter/image.rb', line 3 def filetype @filetype end |
#height ⇒ Object (readonly)
Returns the value of attribute height.
3 4 5 |
# File 'lib/moviemeter/image.rb', line 3 def height @height end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
3 4 5 |
# File 'lib/moviemeter/image.rb', line 3 def type @type end |
#width ⇒ Object (readonly)
Returns the value of attribute width.
3 4 5 |
# File 'lib/moviemeter/image.rb', line 3 def width @width end |