class Rack::Signals::BodyWithCallback

Public Class Methods

new(body, callback) click to toggle source
   # File lib/rack/contrib/signals.rb
21 def initialize(body, callback)
22   @body, @callback = body, callback
23 end

Public Instance Methods

close() click to toggle source
   # File lib/rack/contrib/signals.rb
30 def close
31   @body.close if @body.respond_to?(:close)
32 end
each(&block) click to toggle source
   # File lib/rack/contrib/signals.rb
25 def each(&block)
26   @body.each(&block)
27   @callback.call
28 end