Class: TraceViz::Context::Tracking::ActiveCalls
- Inherits:
-
Object
- Object
- TraceViz::Context::Tracking::ActiveCalls
- Defined in:
- lib/trace_viz/context/tracking/active_calls.rb
Instance Method Summary collapse
- #clear ⇒ Object
- #current ⇒ Object
- #empty? ⇒ Boolean
-
#initialize ⇒ ActiveCalls
constructor
A new instance of ActiveCalls.
- #pop ⇒ Object
- #push(trace_data) ⇒ Object
- #size ⇒ Object
Constructor Details
#initialize ⇒ ActiveCalls
Returns a new instance of ActiveCalls.
7 8 9 |
# File 'lib/trace_viz/context/tracking/active_calls.rb', line 7 def initialize @stack = [] end |
Instance Method Details
#clear ⇒ Object
31 32 33 |
# File 'lib/trace_viz/context/tracking/active_calls.rb', line 31 def clear @stack.clear end |
#current ⇒ Object
19 20 21 |
# File 'lib/trace_viz/context/tracking/active_calls.rb', line 19 def current @stack.last end |
#empty? ⇒ Boolean
23 24 25 |
# File 'lib/trace_viz/context/tracking/active_calls.rb', line 23 def empty? @stack.empty? end |
#pop ⇒ Object
15 16 17 |
# File 'lib/trace_viz/context/tracking/active_calls.rb', line 15 def pop @stack.pop end |
#push(trace_data) ⇒ Object
11 12 13 |
# File 'lib/trace_viz/context/tracking/active_calls.rb', line 11 def push(trace_data) @stack.push(trace_data) end |
#size ⇒ Object
27 28 29 |
# File 'lib/trace_viz/context/tracking/active_calls.rb', line 27 def size @stack.size end |