Class: Chassis::Rack::Instrumentation
- Inherits:
-
Object
- Object
- Chassis::Rack::Instrumentation
- Defined in:
- lib/chassis/rack/instrumentation.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, namespace = nil) ⇒ Instrumentation
constructor
A new instance of Instrumentation.
Constructor Details
#initialize(app, namespace = nil) ⇒ Instrumentation
Returns a new instance of Instrumentation.
6 7 8 9 10 11 12 13 |
# File 'lib/chassis/rack/instrumentation.rb', line 6 def initialize(app, namespace = nil) stack = ::Rack::Builder.new stack.use ::Rack::Runtime stack.use ::Harness::RackInstrumenter, namespace stack.run app @app = stack.to_app end |
Instance Method Details
#call(env) ⇒ Object
15 16 17 |
# File 'lib/chassis/rack/instrumentation.rb', line 15 def call(env) @app.call env end |