class Rack::Utils::Context

application that the request would be forwarded to.
would be the request environment. The second of which would be the rack
#context which should take the arguments env and app. The first of which
in a request handling stack. A compatible middleware must define
Context allows the use of a compatible middleware at different points

def call(env)

def call(env)
  @for.context(env, @app)
end

def context(env, app = @app)

def context(env, app = @app)
  recontext(app).call(env)
end

def initialize(app_f, app_r)

def initialize(app_f, app_r)
  raise 'running context does not respond to #context' unless app_f.respond_to? :context
  @for, @app = app_f, app_r
end

def recontext(app)

def recontext(app)
  self.class.new(@for, app)
end