Source: show | on GitHub
# File actionpack/lib/action_dispatch/middleware/body_proxy.rb, line 4 def initialize(body, &block) @body, @block, @closed = body, block, false end
# File actionpack/lib/action_dispatch/middleware/body_proxy.rb, line 12 def close return if @closed @closed = true begin @body.close if @body.respond_to? :close ensure @block.call end end
# File actionpack/lib/action_dispatch/middleware/body_proxy.rb, line 22 def closed? @closed end
# File actionpack/lib/action_dispatch/middleware/body_proxy.rb, line 26 def method_missing(*args, &block) @body.__send__(*args, &block) end
# File actionpack/lib/action_dispatch/middleware/body_proxy.rb, line 8 def respond_to?(*args) super or @body.respond_to?(*args) end