Class: Riddl::Protocols::SSE::DeferrableBody

Inherits:
Object
  • Object
show all
Includes:
EventMachine::Deferrable
Defined in:
lib/ruby/riddl/protocols/sse.rb

Instance Method Summary collapse

Instance Method Details

#call(body) ⇒ Object



13
14
15
16
17
# File 'lib/ruby/riddl/protocols/sse.rb', line 13

def call(body)
	body.each do |chunk|
		@body_callback.call(chunk)
	end
end

#each(&blk) ⇒ Object



19
20
21
# File 'lib/ruby/riddl/protocols/sse.rb', line 19

def each(&blk)
	@body_callback = blk
end