Class: DeferrableBody

Inherits:
Object show all
Includes:
EventMachine::Deferrable
Defined in:
lib/restrack/async_web_service.rb

Instance Method Summary collapse

Instance Method Details

#call(body) ⇒ Object

[View source]

6
7
8
9
10
# File 'lib/restrack/async_web_service.rb', line 6

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

#each(&blk) ⇒ Object

[View source]

12
13
14
# File 'lib/restrack/async_web_service.rb', line 12

def each(&blk)
  @body_callback = blk
end