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.
132 133 134 135 136 137 138 |
# File 'lib/postproxy/types.rb', line 132 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.
130 131 132 |
# File 'lib/postproxy/types.rb', line 130 def body @body end |
#id ⇒ Object
Returns the value of attribute id.
130 131 132 |
# File 'lib/postproxy/types.rb', line 130 def id @id end |
#media ⇒ Object
Returns the value of attribute media.
130 131 132 |
# File 'lib/postproxy/types.rb', line 130 def media @media end |