Rack::Utils::Context < Object
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.
(from /home/chedong/.local/share/rdoc)
| Use Case | Command | Description |
|---|---|---|
| Create a new context | Rack::Utils::Context.new(app, env) |
Instantiate a new context with a middleware and environment |
| Invoke the middleware chain | context.call(env) |
Call the middleware with the given environment |
| Retrieve the stored app | context.app |
Return the app object held by the context |
Access the for attribute |
context.for |
Return the value of @for |
| Recontextualize | context.recontext |
Handle recontextualization (custom behavior) |
new — Creates a new context instanceapp — Returns the stored appcall — Invokes the middleware chaincontext — Defines the compatible middleware interfacefor — Returns the @for attributerecontext — Recontextualizes the middlewareapp (attr_reader) — The app objectfor (attr_reader) — The value stored in @forGenerated by phpman v4.9.26-1-g511901d · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-07-28 20:30 @216.73.217.46
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Enhanced by LLM: deepseek-v4-flash / taotoken.net / www.chedong.com - original format