Class: Igniter::Contracts::Execution::ExecutionRequest
- Inherits:
-
Object
- Object
- Igniter::Contracts::Execution::ExecutionRequest
- Defined in:
- lib/igniter/contracts/execution/execution_request.rb
Instance Attribute Summary collapse
-
#compiled_graph ⇒ Object
readonly
Returns the value of attribute compiled_graph.
-
#inputs ⇒ Object
readonly
Returns the value of attribute inputs.
-
#profile ⇒ Object
readonly
Returns the value of attribute profile.
-
#runtime ⇒ Object
readonly
Returns the value of attribute runtime.
Instance Method Summary collapse
-
#initialize(compiled_graph:, inputs:, profile:, runtime:) ⇒ ExecutionRequest
constructor
A new instance of ExecutionRequest.
- #to_h ⇒ Object
Constructor Details
#initialize(compiled_graph:, inputs:, profile:, runtime:) ⇒ ExecutionRequest
Returns a new instance of ExecutionRequest.
9 10 11 12 13 14 15 |
# File 'lib/igniter/contracts/execution/execution_request.rb', line 9 def initialize(compiled_graph:, inputs:, profile:, runtime:) @compiled_graph = compiled_graph @inputs = inputs.is_a?(NamedValues) ? inputs : NamedValues.new(inputs) @profile = profile @runtime = runtime 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_request.rb', line 7 def compiled_graph @compiled_graph end |
#inputs ⇒ Object (readonly)
Returns the value of attribute inputs.
7 8 9 |
# File 'lib/igniter/contracts/execution/execution_request.rb', line 7 def inputs @inputs end |
#profile ⇒ Object (readonly)
Returns the value of attribute profile.
7 8 9 |
# File 'lib/igniter/contracts/execution/execution_request.rb', line 7 def profile @profile end |
#runtime ⇒ Object (readonly)
Returns the value of attribute runtime.
7 8 9 |
# File 'lib/igniter/contracts/execution/execution_request.rb', line 7 def runtime @runtime end |
Instance Method Details
#to_h ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'lib/igniter/contracts/execution/execution_request.rb', line 17 def to_h { compiled_graph: StructuredDump.dump(compiled_graph), inputs: inputs.to_h, profile_fingerprint: profile.fingerprint, runtime: runtime.name } end |