Class: DeferrableBody
- Inherits:
-
Object
- Object
- DeferrableBody
- Includes:
- EventMachine::Deferrable
- Defined in:
- lib/the_wizard_of_api.rb
Instance Method Summary collapse
Instance Method Details
#call(body) ⇒ Object
8 9 10 11 12 |
# File 'lib/the_wizard_of_api.rb', line 8 def call(body) body.each do |chunk| @body_callback.call(chunk) end end |
#each(&blk) ⇒ Object
14 15 16 |
# File 'lib/the_wizard_of_api.rb', line 14 def each &blk @body_callback = blk end |