Class: Usher::Interface::Rack::Middleware
- Inherits:
-
Object
- Object
- Usher::Interface::Rack::Middleware
- Defined in:
- lib/usher/interface/rack/middleware.rb
Overview
Middleware for using Usher’s rack interface to recognize the request, then, pass on to the next application. Values are stored in env normally. The details of that storage is in the Rack interface itself.
Instance Method Summary collapse
-
#call(env) ⇒ #each
The application’s return.
-
#initialize(app, router) ⇒ Middleware
constructor
A new instance of Middleware.
Constructor Details
#initialize(app, router) ⇒ Middleware
11 12 13 14 |
# File 'lib/usher/interface/rack/middleware.rb', line 11 def initialize(app, router) @app = app @router = router end |
Instance Method Details
#call(env) ⇒ #each
18 19 20 21 |
# File 'lib/usher/interface/rack/middleware.rb', line 18 def call(env) @router.call(env) @app.call(env) end |