Class: LittleGhost::Content::Image
- Inherits:
-
Data
- Object
- Data
- LittleGhost::Content::Image
- Includes:
- Module.new do # :nodoc: def to_h = Content.serialize(self) def to_json(*arguments) = JSON.generate(to_h, *arguments) end
- Defined in:
- lib/little_ghost/content.rb,
lib/little_ghost/content.rb
Overview
Contains binary image data and its MIME media type. Content.serialize
base64-encodes data when the block crosses a JSON boundary.
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#media_type ⇒ Object
readonly
Returns the value of attribute media_type.
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data
26 27 28 |
# File 'lib/little_ghost/content.rb', line 26 def data @data end |
#media_type ⇒ Object (readonly)
Returns the value of attribute media_type
26 27 28 |
# File 'lib/little_ghost/content.rb', line 26 def media_type @media_type end |