# class ActionDispatch::BodyProxy

### Public Class Methods

new(body, &block) click to toggle source

    # File lib/action_dispatch/middleware/body_proxy.rb, line 4
    def initialize(body, &block)
      @body, @block, @closed = body, block, false
    end

### Public Instance Methods

close() click to toggle source

    # File 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

closed?() click to toggle source

    # File lib/action_dispatch/middleware/body_proxy.rb, line 22
    def closed?
      @closed
    end

method_missing(*args, &block) click to toggle source

    # File lib/action_dispatch/middleware/body_proxy.rb, line 26
    def method_missing(*args, &block)
      @body.__send__(*args, &block)
    end

respond_to?(*args) click to toggle source
Calls superclass method

    # File lib/action_dispatch/middleware/body_proxy.rb, line 8
    def respond_to?(*args)
      super or @body.respond_to?(*args)
    end