Class: Rack::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/rack/contrib/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.



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

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

Instance Method Details

#call(env) ⇒ Object



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

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