Class: Puma::Configuration::ConfigMiddleware
- Inherits:
-
Object
- Object
- Puma::Configuration::ConfigMiddleware
- Defined in:
- lib/puma/configuration.rb
Overview
Injects the Configuration object into the env
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(config, app) ⇒ ConfigMiddleware
constructor
A new instance of ConfigMiddleware.
Constructor Details
#initialize(config, app) ⇒ ConfigMiddleware
Returns a new instance of ConfigMiddleware.
61 62 63 64 |
# File 'lib/puma/configuration.rb', line 61 def initialize(config, app) @config = config @app = app end |
Instance Method Details
#call(env) ⇒ Object
66 67 68 69 |
# File 'lib/puma/configuration.rb', line 66 def call(env) env[Const::PUMA_CONFIG] = @config @app.call(env) end |