Class: Turbine::Pipeline::Trace
- Defined in:
- lib/turbine/pipeline/trace.rb
Overview
Trace alters the pipeline such that instead of returning a single “reduced” value each time the pipeline is run, an array is returned with each element containing the result of each segment.
See DSL#trace for more information.
Defined Under Namespace
Modules: Transparent, Untraceable
Instance Attribute Summary
Attributes inherited from Segment
Instance Method Summary collapse
-
#next ⇒ Object
Public: Runs the pipeline once, returning the full trace which was traversed in order to retrieve the value.
-
#source=(upstream) ⇒ Object
Public: Sets the segment which serves as the source for the Trace.
Methods inherited from Segment
#append, #each, #initialize, #inspect, #rewind, #to_s, #trace, #tracing=
Constructor Details
This class inherits a constructor from Turbine::Pipeline::Segment
Instance Method Details
#next ⇒ Object
Public: Runs the pipeline once, returning the full trace which was traversed in order to retrieve the value.
Returns an object.
22 23 24 25 |
# File 'lib/turbine/pipeline/trace.rb', line 22 def next @source.next @source.trace end |
#source=(upstream) ⇒ Object
Public: Sets the segment which serves as the source for the Trace. Enables tracing on the source, and all of the parent sources.
Returns the source.
13 14 15 16 |
# File 'lib/turbine/pipeline/trace.rb', line 13 def source=(upstream) upstream.tracing = true super end |