Class: Rack::Config
- Inherits:
-
Object
- Object
- Rack::Config
- Defined in:
- lib/rack/contrib/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.
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 |