Parent

Class Index [+]

Quicksearch

Rack::Utils::Context

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

Attributes

for[R]

(Not documented)

app[R]

(Not documented)

Public Class Methods

new(app_f, app_r) click to toggle source

(Not documented)

     # File lib/rack/utils.rb, line 169
169:       def initialize(app_f, app_r)
170:         raise 'running context does not respond to #context' unless app_f.respond_to? :context
171:         @for, @app = app_f, app_r
172:       end

Public Instance Methods

call(env) click to toggle source

(Not documented)

     # File lib/rack/utils.rb, line 174
174:       def call(env)
175:         @for.context(env, @app)
176:       end
context(env, app=@app) click to toggle source

(Not documented)

     # File lib/rack/utils.rb, line 182
182:       def context(env, app=@app)
183:         recontext(app).call(env)
184:       end
recontext(app) click to toggle source

(Not documented)

     # File lib/rack/utils.rb, line 178
178:       def recontext(app)
179:         self.class.new(@for, app)
180:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.