Sha256: c196ea0dcbc8409c9fe5d5572b76e972c7fc98f581c78f641fe34058f5035a64
Contents?: true
Size: 439 Bytes
Versions: 3
Compression:
Stored size: 439 Bytes
Contents
module Rack::Accept # Implements the Rack middleware interface. class Context attr_reader :app def initialize(app) @app = app yield self if block_given? end # Inserts a new Rack::Accept::Request object into the environment before # handing the request to the app immediately downstream. def call(env) env['rack-accept.request'] ||= Request.new(env) @app.call(env) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
rack-accept-0.2 | lib/rack/accept/context.rb |
rack-accept-0.1.1 | lib/rack/accept/context.rb |
rack-accept-0.1 | lib/rack/accept/context.rb |