Class: DeferrableBody

Inherits:
Object
  • Object
show all
Includes:
EventMachine::Deferrable
Defined in:
lib/couchproxy/deferrable_body.rb

Instance Method Summary collapse

Instance Method Details

#call(body) ⇒ Object



6
7
8
9
10
# File 'lib/couchproxy/deferrable_body.rb', line 6

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

#each(&blk) ⇒ Object



12
13
14
# File 'lib/couchproxy/deferrable_body.rb', line 12

def each(&blk)
  @body_callback = blk
end