Class: Ayadn::StreamDataObject
Instance Attribute Summary collapse
-
#input ⇒ Object
readonly
Returns the value of attribute input.
-
#posts ⇒ Object
readonly
Returns the value of attribute posts.
Instance Method Summary collapse
-
#initialize(hash) ⇒ StreamDataObject
constructor
A new instance of StreamDataObject.
Constructor Details
#initialize(hash) ⇒ StreamDataObject
Returns a new instance of StreamDataObject.
37 38 39 40 |
# File 'lib/ayadn/stream_object.rb', line 37 def initialize hash @input = hash["data"] @posts = @input.blank? ? [] : @input.map { |post| PostObject.new(post) } end |
Instance Attribute Details
#input ⇒ Object (readonly)
Returns the value of attribute input.
35 36 37 |
# File 'lib/ayadn/stream_object.rb', line 35 def input @input end |
#posts ⇒ Object (readonly)
Returns the value of attribute posts.
35 36 37 |
# File 'lib/ayadn/stream_object.rb', line 35 def posts @posts end |