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



77
78
79
80
# File 'lib/puma/configuration.rb', line 77

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

Instance Method Details

#call(env) ⇒ Object



82
83
84
85
# File 'lib/puma/configuration.rb', line 82

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