Class: Gaskit::FlowResult
- Inherits:
-
OperationResult
- Object
- OperationResult
- Gaskit::FlowResult
- Defined in:
- lib/gaskit/flow_result.rb
Overview
Represents the result of a flow execution, including step-by-step trace
Instance Attribute Summary collapse
-
#steps ⇒ Array<Hash>
readonly
A list of step data executed during the flow.
Attributes inherited from OperationResult
#context, #duration, #error, #success, #value
Instance Method Summary collapse
-
#initialize(success, value, error = nil, **options) ⇒ FlowResult
constructor
Initializes a new FlowResult .
- #to_h ⇒ Object
Methods inherited from OperationResult
#early_exit?, #failure?, #inspect, #status, #success?, #to_json
Constructor Details
#initialize(success, value, error = nil, **options) ⇒ FlowResult
Initializes a new FlowResult .
26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/gaskit/flow_result.rb', line 26 def initialize(success, value, error = nil, **) super( success, value, error, duration: [:duration], context: [:context] ) @steps = .fetch(:steps, []) end |
Instance Attribute Details
#steps ⇒ Array<Hash> (readonly)
Returns A list of step data executed during the flow.
15 16 17 |
# File 'lib/gaskit/flow_result.rb', line 15 def steps @steps end |
Instance Method Details
#to_h ⇒ Object
38 39 40 |
# File 'lib/gaskit/flow_result.rb', line 38 def to_h super.merge(steps: steps) end |