Class: Rack::App::Middlewares::Params::Parser

Inherits:
Object
  • Object
show all
Defined in:
lib/rack/app/middlewares/params/parser.rb

Instance Method Summary collapse

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