Class: PostProxy::ThreadChild
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#id ⇒ Object
Returns the value of attribute id.
-
#media ⇒ Object
Returns the value of attribute media.
Instance Method Summary collapse
-
#initialize(**attrs) ⇒ ThreadChild
constructor
A new instance of ThreadChild.
Methods inherited from Model
Constructor Details
#initialize(**attrs) ⇒ ThreadChild
Returns a new instance of ThreadChild.
101 102 103 104 105 106 107 |
# File 'lib/postproxy/types.rb', line 101 def initialize(**attrs) @media = [] super @media = (@media || []).map do |m| m.is_a?(Media) ? m : Media.new(**m.transform_keys(&:to_sym)) end end |
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
99 100 101 |
# File 'lib/postproxy/types.rb', line 99 def body @body end |
#id ⇒ Object
Returns the value of attribute id.
99 100 101 |
# File 'lib/postproxy/types.rb', line 99 def id @id end |
#media ⇒ Object
Returns the value of attribute media.
99 100 101 |
# File 'lib/postproxy/types.rb', line 99 def media @media end |