Class: Trailblazer::Developer::Trace::Stack
- Inherits:
-
Object
- Object
- Trailblazer::Developer::Trace::Stack
- Defined in:
- lib/trailblazer/developer/trace/stack.rb
Overview
The stack is a linear one-dimensional array. Per traced task two Captured elements get pushed onto it (unless there’s an Exception).
Instance Method Summary collapse
- #<<(captured) ⇒ Object
-
#initialize(captureds = []) ⇒ Stack
constructor
A new instance of Stack.
- #to_a ⇒ Object
Constructor Details
#initialize(captureds = []) ⇒ Stack
Returns a new instance of Stack.
7 8 9 |
# File 'lib/trailblazer/developer/trace/stack.rb', line 7 def initialize(captureds=[]) @stack = captureds end |
Instance Method Details
#<<(captured) ⇒ Object
11 12 13 |
# File 'lib/trailblazer/developer/trace/stack.rb', line 11 def <<(captured) @stack << captured end |
#to_a ⇒ Object
15 16 17 |
# File 'lib/trailblazer/developer/trace/stack.rb', line 15 def to_a @stack end |