Class: Ayadn::StreamDataObject

Inherits:
Object
  • Object
show all
Defined in:
lib/ayadn/stream_object.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#inputObject (readonly)

Returns the value of attribute input.



35
36
37
# File 'lib/ayadn/stream_object.rb', line 35

def input
  @input
end

#postsObject (readonly)

Returns the value of attribute posts.



35
36
37
# File 'lib/ayadn/stream_object.rb', line 35

def posts
  @posts
end