class Rack::Config - rack-1.6.1 Documentation

# class Rack::Config

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

Example:

    use Rack::Config do |env|
      env['my-key'] = 'some-value'
    end

### Public Class Methods

new(app, &block) click to toggle source

    # File lib/rack/config.rb, line 10
    def initialize(app, &block)
      @app = app
      @block = block
    end

### Public Instance Methods

call(env) click to toggle source

    # File lib/rack/config.rb, line 15
    def call(env)
      @block.call(env)
      @app.call(env)
    end