Class: EmbeddedImage::ImageData

Inherits:
Object
  • Object
show all
Defined in:
lib/transit/support/embedded_image.rb

Overview

Acts as a `middleware` to provide compatability between general files and uploaded files.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(img) ⇒ ImageData

:nodoc:



18
19
20
21
# File 'lib/transit/support/embedded_image.rb', line 18

def initialize(img) #:nodoc:
  @content_type = img.content_type
  @body         = img.read
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body



16
17
18
# File 'lib/transit/support/embedded_image.rb', line 16

def body
  @body
end

#content_typeObject (readonly)

Returns the value of attribute content_type



16
17
18
# File 'lib/transit/support/embedded_image.rb', line 16

def content_type
  @content_type
end