Sha256: 9fa2303f67b99e7f62e6636ac6e0d483b33b18baf7f20164c6d6dff85602190d

Contents?: true

Size: 410 Bytes

Versions: 110

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

110 entries across 93 versions & 20 rubygems

Version Path
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.1.0/gems/rack-2.2.10/lib/rack/config.rb
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.3.0/gems/rack-2.2.10/lib/rack/config.rb
minato_ruby_api_client-0.2.2 vendor/bundle/ruby/3.2.0/gems/rack-3.1.7/lib/rack/config.rb
rack-3.1.8 lib/rack/config.rb
rack-2.2.10 lib/rack/config.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/rack-2.2.9/lib/rack/config.rb
rack-3.1.7 lib/rack/config.rb
rack-3.1.6 lib/rack/config.rb
rack-3.1.5 lib/rack/config.rb
rack-3.1.4 lib/rack/config.rb
cm-admin-1.5.22 vendor/bundle/ruby/3.3.0/gems/rack-2.2.7/lib/rack/config.rb
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/rack-2.2.7/lib/rack/config.rb
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/rack-2.2.7/lib/rack/config.rb
katalyst-govuk-formbuilder-1.9.2 vendor/bundle/ruby/3.3.0/gems/rack-3.1.3/lib/rack/config.rb
rack-3.1.3 lib/rack/config.rb
rack-3.1.2 lib/rack/config.rb
rack-3.1.1 lib/rack/config.rb
rack-3.1.0 lib/rack/config.rb
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