mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
21 lines
379 B
Ruby
21 lines
379 B
Ruby
module Rack
|
|
# Rack::Config modifies the environment using the block given during
|
|
# initialization.
|
|
#
|
|
# Example:
|
|
# use Rack::Config do |env|
|
|
# env['my-key'] = 'some-value'
|
|
# end
|
|
class Config
|
|
def initialize(app, &block)
|
|
@app = app
|
|
@block = block
|
|
end
|
|
|
|
def call(env)
|
|
@block.call(env)
|
|
@app.call(env)
|
|
end
|
|
end
|
|
end
|