Class: Promenade::Client::Rack::MiddlwareBase
- Inherits:
-
Object
- Object
- Promenade::Client::Rack::MiddlwareBase
- Defined in:
- lib/promenade/client/rack/middleware_base.rb
Direct Known Subclasses
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, registry:, label_builder:) ⇒ MiddlwareBase
constructor
A new instance of MiddlwareBase.
Constructor Details
#initialize(app, registry:, label_builder:) ⇒ MiddlwareBase
Returns a new instance of MiddlwareBase.
5 6 7 8 9 10 11 |
# File 'lib/promenade/client/rack/middleware_base.rb', line 5 def initialize(app, registry:, label_builder:) @app = app @registry = registry @label_builder = label_builder register_metrics! end |
Instance Method Details
#call(env) ⇒ Object
13 14 15 |
# File 'lib/promenade/client/rack/middleware_base.rb', line 13 def call(env) trace(env) { app.call(env) } end |