Class: Rack::Config
- Inherits:
-
Object
- Object
- Rack::Config
- Defined in:
- lib/rack/config.rb
Overview
Rack::Config modifies the environment using the block given during initialization.
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, &block) ⇒ Config
constructor
A new instance of Config.
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 |