config.rb 277 B

123456789101112131415
  1. module Rack
  2. # Rack::Config modifies the environment using the block given during
  3. # initialization.
  4. class Config
  5. def initialize(app, &block)
  6. @app = app
  7. @block = block
  8. end
  9. def call(env)
  10. @block.call(env)
  11. @app.call(env)
  12. end
  13. end
  14. end