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.



265
266
267
268
# File 'lib/puma/configuration.rb', line 265

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

Instance Method Details

#call(env) ⇒ Object



270
271
272
273
# File 'lib/puma/configuration.rb', line 270

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