Class: Meerkat::RackAdapter::DeferrableBody

Inherits:
Object
  • Object
show all
Includes:
EventMachine::Deferrable
Defined in:
lib/meerkat/rackadapter.rb

Instance Method Summary collapse

Instance Method Details

#<<(str) ⇒ Object



72
73
74
# File 'lib/meerkat/rackadapter.rb', line 72

def <<(str)
  call([str])
end

#call(body) ⇒ Object



66
67
68
69
70
# File 'lib/meerkat/rackadapter.rb', line 66

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

#each(&blk) ⇒ Object



76
77
78
# File 'lib/meerkat/rackadapter.rb', line 76

def each(&blk)
  @body_callback = blk
end