Class: ActionController::RewindableInput
- Defined in:
- lib/action_controller/rewindable_input.rb
Defined Under Namespace
Classes: RewindableIO
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app) ⇒ RewindableInput
constructor
A new instance of RewindableInput.
Constructor Details
#initialize(app) ⇒ RewindableInput
Returns a new instance of RewindableInput.
19 20 21 |
# File 'lib/action_controller/rewindable_input.rb', line 19 def initialize(app) @app = app end |
Instance Method Details
#call(env) ⇒ Object
23 24 25 26 |
# File 'lib/action_controller/rewindable_input.rb', line 23 def call(env) env['rack.input'] = RewindableIO.new(env['rack.input']) @app.call(env) end |