Class: Puma::Configuration::ConfigMiddleware

Inherits:
Object
  • Object
show all
Defined in:
lib/puma/configuration.rb

Overview

Injects the Configuration object into the env

Instance Method Summary collapse

Constructor Details

#initialize(config, app) ⇒ ConfigMiddleware

Returns a new instance of ConfigMiddleware.


221
222
223
224
# File 'lib/puma/configuration.rb', line 221

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

Instance Method Details

#call(env) ⇒ Object


226
227
228
229
# File 'lib/puma/configuration.rb', line 226

def call(env)
  env[Const::PUMA_CONFIG] = @config
  @app.call(env)
end