Class: LittleGhost::Content::Document
- Inherits:
-
Data
- Object
- Data
- LittleGhost::Content::Document
- 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 document data, its MIME media type, and a display name.
Content.serialize base64-encodes data in the serialized Hash.
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#media_type ⇒ Object
readonly
Returns the value of attribute media_type.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data
34 35 36 |
# File 'lib/little_ghost/content.rb', line 34 def data @data end |
#media_type ⇒ Object (readonly)
Returns the value of attribute media_type
34 35 36 |
# File 'lib/little_ghost/content.rb', line 34 def media_type @media_type end |
#name ⇒ Object (readonly)
Returns the value of attribute name
34 35 36 |
# File 'lib/little_ghost/content.rb', line 34 def name @name end |