Class: TraceViz::Context::TrackingContext

Inherits:
BaseContext
  • Object
show all
Defined in:
lib/trace_viz/context/tracking_context.rb

Instance Attribute Summary collapse

Attributes inherited from BaseContext

#options

Instance Method Summary collapse

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(**options)
  super

  @active_calls = Tracking::ActiveCalls.new
end

Instance Attribute Details

#active_callsObject (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_callObject



18
19
20
# File 'lib/trace_viz/context/tracking_context.rb', line 18

def current_call
  active_calls.current
end

#current_depthObject



22
23
24
# File 'lib/trace_viz/context/tracking_context.rb', line 22

def current_depth
  active_calls.size
end