class DeferrableBody

Public Instance Methods

call(body) click to toggle source
# File lib/the_wizard_of_api.rb, line 8
def call(body)
  body.each do |chunk|
    @body_callback.call(chunk)
  end
end
each(&blk) click to toggle source
# File lib/the_wizard_of_api.rb, line 14
def each &blk
  @body_callback = blk
end