Class: Rack::Config

Inherits:
Object
  • Object
show all
Defined in:
rack/rack/config.rb

Overview

Rack::Config modifies the environment using the block given during initialization.

Example: use Rack::Config do |env| env = 'some-value' end

Instance Method Summary (collapse)

Constructor Details

- (Config) initialize(app, &block)

Returns a new instance of Config



10
11
12
13
# File 'rack/rack/config.rb', line 10

def initialize(app, &block)
  @app = app
  @block = block
end

Instance Method Details

- (void) call(env)



15
16
17
18
# File 'rack/rack/config.rb', line 15

def call(env)
  @block.call(env)
  @app.call(env)
end