Parent

Class Index [+]

Quicksearch

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 245
245:       def initialize(app_f, app_r)
246:         raise 'running context does not respond to #context' unless app_f.respond_to? :context
247:         @for, @app = app_f, app_r
248:       end

Public Instance Methods

call(env) click to toggle source

(Not documented)

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

(Not documented)

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

(Not documented)

     # File lib/rack/utils.rb, line 254
254:       def recontext(app)
255:         self.class.new(@for, app)
256:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.