Class: Tap::Test::Tracer
- Inherits:
-
Middleware
- Object
- Middleware
- Tap::Test::Tracer
- Defined in:
- lib/tap/test/tracer.rb
Instance Attribute Summary collapse
-
#results ⇒ Object
readonly
Returns the value of attribute results.
-
#runlist ⇒ Object
readonly
Returns the value of attribute runlist.
-
#stack ⇒ Object
readonly
Returns the value of attribute stack.
Instance Method Summary collapse
- #call(node, inputs = []) ⇒ Object
-
#initialize(stack) ⇒ Tracer
constructor
A new instance of Tracer.
Constructor Details
#initialize(stack) ⇒ Tracer
Returns a new instance of Tracer.
10 11 12 13 14 |
# File 'lib/tap/test/tracer.rb', line 10 def initialize(stack) @stack = stack @results = {} @runlist = [] end |
Instance Attribute Details
#results ⇒ Object (readonly)
Returns the value of attribute results.
7 8 9 |
# File 'lib/tap/test/tracer.rb', line 7 def results @results end |
#runlist ⇒ Object (readonly)
Returns the value of attribute runlist.
8 9 10 |
# File 'lib/tap/test/tracer.rb', line 8 def runlist @runlist end |
#stack ⇒ Object (readonly)
Returns the value of attribute stack.
6 7 8 |
# File 'lib/tap/test/tracer.rb', line 6 def stack @stack end |
Instance Method Details
#call(node, inputs = []) ⇒ Object
16 17 18 19 20 21 |
# File 'lib/tap/test/tracer.rb', line 16 def call(node, inputs=[]) runlist << node result = stack.call(node, inputs) (results[node] ||= []) << result result end |