Sha256: 9fa2303f67b99e7f62e6636ac6e0d483b33b18baf7f20164c6d6dff85602190d

Contents?: true

Size: 410 Bytes

Versions: 112

Compression:

Stored size: 410 Bytes

Contents

# frozen_string_literal: true

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

Version data entries

112 entries across 95 versions & 21 rubygems

Version Path
tinymce-rails-7.1.2 vendor/bundle/ruby/3.3.0/gems/rack-3.0.11/lib/rack/config.rb
rack-2.2.9 lib/rack/config.rb
rack-3.0.10 lib/rack/config.rb
rack-3.0.9.1 lib/rack/config.rb
rack-2.2.8.1 lib/rack/config.rb
rack-2.1.4.4 lib/rack/config.rb
mlh-rubocop-config-1.0.3 vendor/bundle/ruby/3.2.0/gems/rack-3.0.9/lib/rack/config.rb
rack-3.0.9 lib/rack/config.rb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/rack-2.2.4/lib/rack/config.rb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/rack-2.2.7/lib/rack/config.rb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/rack-2.2.3/lib/rack/config.rb
rack-2.2.8 lib/rack/config.rb
mlh-rubocop-config-1.0.2 vendor/bundle/ruby/3.2.0/gems/rack-3.0.8/lib/rack/config.rb
fablicop-1.10.3 vendor/bundle/ruby/3.2.0/gems/rack-3.0.7/lib/rack/config.rb
fablicop-1.10.3 vendor/bundle/ruby/3.2.0/gems/rack-3.0.8/lib/rack/config.rb
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/rack-2.2.7/lib/rack/config.rb
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/rack-2.2.3/lib/rack/config.rb
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/rack-2.2.4/lib/rack/config.rb
rubypitaya-3.12.5 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rack-2.2.5/lib/rack/config.rb
rack-3.0.8 lib/rack/config.rb