Class: Rack::Config

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

Overview

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

Instance Method Summary collapse

Constructor Details

#initialize(app, &block) ⇒ Config

Returns a new instance of Config.


5
6
7
8
# File 'lib/rack/config.rb', line 5

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

Instance Method Details

#call(env) ⇒ Object


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

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