Class: Miu::Resources::Content

Inherits:
Base
  • Object
show all
Defined in:
lib/miu/resources/content.rb

Direct Known Subclasses

EnterContent, LeaveContent, TextContent

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#to_msgpack

Constructor Details

#initialize(options = {}) ⇒ Content

Returns a new instance of Content.



9
10
11
# File 'lib/miu/resources/content.rb', line 9

def initialize(options = {})
  @meta = options[:meta] || {}
end

Instance Attribute Details

#metaObject

Returns the value of attribute meta.



7
8
9
# File 'lib/miu/resources/content.rb', line 7

def meta
  @meta
end

#rawObject

Returns the value of attribute raw.



6
7
8
# File 'lib/miu/resources/content.rb', line 6

def raw
  @raw
end

Instance Method Details

#to_hObject



13
14
15
# File 'lib/miu/resources/content.rb', line 13

def to_h
  super.merge({:meta => @meta})
end