Class: BenjiNode::Middleware
- Inherits:
-
Object
- Object
- BenjiNode::Middleware
- Defined in:
- lib/benji_node/middleware.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app) ⇒ Middleware
constructor
A new instance of Middleware.
Constructor Details
#initialize(app) ⇒ Middleware
Returns a new instance of Middleware.
4 5 6 |
# File 'lib/benji_node/middleware.rb', line 4 def initialize(app) @app = app end |
Instance Method Details
#call(env) ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/benji_node/middleware.rb', line 8 def call(env) response = notifications.instrument "rack.request", :path => env["PATH_INFO"], :method => env["REQUEST_METHOD"], :instrumenter_id => notifications.instrumenter.id do @app.call(env) end end |