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.



272
273
274
275
# File 'lib/puma/configuration.rb', line 272

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

Instance Method Details

#call(env) ⇒ Object



277
278
279
280
# File 'lib/puma/configuration.rb', line 277

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