Class: TraceViz::Context::TrackingContext
- Inherits:
-
BaseContext
- Object
- BaseContext
- TraceViz::Context::TrackingContext
- Defined in:
- lib/trace_viz/context/tracking_context.rb
Instance Attribute Summary collapse
-
#active_calls ⇒ Object
readonly
Returns the value of attribute active_calls.
Attributes inherited from BaseContext
Instance Method Summary collapse
- #current_call ⇒ Object
- #current_depth ⇒ Object
-
#initialize(**options) ⇒ TrackingContext
constructor
A new instance of TrackingContext.
Constructor Details
#initialize(**options) ⇒ TrackingContext
Returns a new instance of TrackingContext.
12 13 14 15 16 |
# File 'lib/trace_viz/context/tracking_context.rb', line 12 def initialize(**) super @active_calls = Tracking::ActiveCalls.new end |
Instance Attribute Details
#active_calls ⇒ Object (readonly)
Returns the value of attribute active_calls.
10 11 12 |
# File 'lib/trace_viz/context/tracking_context.rb', line 10 def active_calls @active_calls end |
Instance Method Details
#current_call ⇒ Object
18 19 20 |
# File 'lib/trace_viz/context/tracking_context.rb', line 18 def current_call active_calls.current end |
#current_depth ⇒ Object
22 23 24 |
# File 'lib/trace_viz/context/tracking_context.rb', line 22 def current_depth active_calls.size end |