Class: Igniter::Contracts::Execution::ExecutionResult
- Inherits:
-
Object
- Object
- Igniter::Contracts::Execution::ExecutionResult
- Defined in:
- lib/igniter/contracts/execution/execution_result.rb
Instance Attribute Summary collapse
-
#compiled_graph ⇒ Object
readonly
Returns the value of attribute compiled_graph.
-
#outputs ⇒ Object
readonly
Returns the value of attribute outputs.
-
#profile_fingerprint ⇒ Object
readonly
Returns the value of attribute profile_fingerprint.
-
#state ⇒ Object
readonly
Returns the value of attribute state.
Instance Method Summary collapse
-
#initialize(state:, outputs:, profile_fingerprint:, compiled_graph:) ⇒ ExecutionResult
constructor
A new instance of ExecutionResult.
- #output(name) ⇒ Object
- #to_h ⇒ Object
Constructor Details
#initialize(state:, outputs:, profile_fingerprint:, compiled_graph:) ⇒ ExecutionResult
Returns a new instance of ExecutionResult.
9 10 11 12 13 14 15 |
# File 'lib/igniter/contracts/execution/execution_result.rb', line 9 def initialize(state:, outputs:, profile_fingerprint:, compiled_graph:) @state = state @outputs = outputs @profile_fingerprint = profile_fingerprint @compiled_graph = compiled_graph freeze end |
Instance Attribute Details
#compiled_graph ⇒ Object (readonly)
Returns the value of attribute compiled_graph.
7 8 9 |
# File 'lib/igniter/contracts/execution/execution_result.rb', line 7 def compiled_graph @compiled_graph end |
#outputs ⇒ Object (readonly)
Returns the value of attribute outputs.
7 8 9 |
# File 'lib/igniter/contracts/execution/execution_result.rb', line 7 def outputs @outputs end |
#profile_fingerprint ⇒ Object (readonly)
Returns the value of attribute profile_fingerprint.
7 8 9 |
# File 'lib/igniter/contracts/execution/execution_result.rb', line 7 def profile_fingerprint @profile_fingerprint end |
#state ⇒ Object (readonly)
Returns the value of attribute state.
7 8 9 |
# File 'lib/igniter/contracts/execution/execution_result.rb', line 7 def state @state end |
Instance Method Details
#output(name) ⇒ Object
17 18 19 |
# File 'lib/igniter/contracts/execution/execution_result.rb', line 17 def output(name) outputs.fetch(name.to_sym) end |
#to_h ⇒ Object
21 22 23 24 25 26 27 28 |
# File 'lib/igniter/contracts/execution/execution_result.rb', line 21 def to_h { state: state.to_h, outputs: outputs.to_h, profile_fingerprint: profile_fingerprint, compiled_graph: compiled_graph.to_h } end |