Class: Rack::App::Middlewares::SetPathParams

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

Constant Summary collapse

E =
Rack::App::Constants::ENV

Instance Method Summary collapse

Constructor Details

#initialize(app, build_env) ⇒ SetPathParams

Returns a new instance of SetPathParams.



3
4
5
6
# File 'lib/rack/app/middlewares/set_path_params.rb', line 3

def initialize(app, build_env)
  @build_env = build_env
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



10
11
12
13
14
# File 'lib/rack/app/middlewares/set_path_params.rb', line 10

def call(env)
  populate_path_params(env)
  correct_last_value_from_extensions(env)
  @app.call(env)
end