Class: EmbeddedImage::ImageData
- Inherits:
-
Object
- Object
- EmbeddedImage::ImageData
- 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)
-
- (Object) body
readonly
Returns the value of attribute body.
-
- (Object) content_type
readonly
Returns the value of attribute content_type.
Instance Method Summary (collapse)
-
- (ImageData) initialize(img)
constructor
:nodoc:.
Constructor Details
- (ImageData) initialize(img)
: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
- (Object) body (readonly)
Returns the value of attribute body
16 17 18 |
# File 'lib/transit/support/embedded_image.rb', line 16 def body @body end |
- (Object) content_type (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 |