Class: Rack::App::Middlewares::Params::Parser
- Inherits:
-
Object
- Object
- Rack::App::Middlewares::Params::Parser
- Defined in:
- lib/rack/app/middlewares/params/parser.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, descriptor) ⇒ Parser
constructor
A new instance of Parser.
Constructor Details
#initialize(app, descriptor) ⇒ Parser
Returns a new instance of Parser.
3 4 5 6 7 |
# File 'lib/rack/app/middlewares/params/parser.rb', line 3 def initialize(app, descriptor) @app = app @descriptor = descriptor @merged_params_descriptor = descriptor.values.reduce(:merge) end |
Instance Method Details
#call(env) ⇒ Object
9 10 11 12 13 |
# File 'lib/rack/app/middlewares/params/parser.rb', line 9 def call(env) set_params(env) @app.call(env) end |