Class: Rack::RewindableInput::Middleware
Relationships & Source Files | |
Inherits: | Object |
Defined in: | lib/rack/rewindable_input.rb |
Overview
Makes rack.input rewindable, for compatibility with applications and middleware designed for earlier versions of ::Rack
(where rack.input was required to be rewindable).
Class Method Summary
- .new(app) ⇒ Middleware constructor
Instance Method Summary
Constructor Details
.new(app) ⇒ Middleware
# File 'lib/rack/rewindable_input.rb', line 19
def initialize(app) @app = app end
Instance Method Details
#call(env)
[ GitHub ]# File 'lib/rack/rewindable_input.rb', line 23
def call(env) if (input = env[RACK_INPUT]) env[RACK_INPUT] = RewindableInput.new(input) end @app.call(env) end