Class: Usher::Interface::Rack::Middleware

Inherits:
Object
  • Object
show all
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

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