Class: Highway::Compiler::Build::Output::Invocation
- Inherits:
-
Object
- Object
- Highway::Compiler::Build::Output::Invocation
- Defined in:
- lib/highway/compiler/build/output/invocation.rb
Overview
This class represents a step invocation in the build manifest. It contains information about step definition class, parameters and execution policy.
Instance Attribute Summary collapse
-
#index ⇒ Integer
readonly
Index of invocation, 1-based.
-
#keypath ⇒ Array<String>
readonly
A keypath used for debugging purposes.
-
#parameters ⇒ Highway::Compiler::Analyze::Tree::Values::Hash
readonly
Hash value of step parameters.
-
#policy ⇒ Symbol
readonly
Execution policy of the step invocation.
-
#step_class ⇒ Class
readonly
Definition class of the step.
Instance Method Summary collapse
-
#identifier ⇒ String
An identifier of the invocation, joined by index and step name.
-
#initialize(index:, step_class:, parameters:, policy:, keypath:) ⇒ Invocation
constructor
Initialize an instance.
Constructor Details
#initialize(index:, step_class:, parameters:, policy:, keypath:) ⇒ Invocation
Initialize an instance.
25 26 27 28 29 30 31 |
# File 'lib/highway/compiler/build/output/invocation.rb', line 25 def initialize(index:, step_class:, parameters:, policy:, keypath:) @index = index @step_class = step_class @parameters = parameters @policy = policy @keypath = keypath end |
Instance Attribute Details
#index ⇒ Integer (readonly)
Index of invocation, 1-based.
36 37 38 |
# File 'lib/highway/compiler/build/output/invocation.rb', line 36 def index @index end |
#keypath ⇒ Array<String> (readonly)
A keypath used for debugging purposes.
56 57 58 |
# File 'lib/highway/compiler/build/output/invocation.rb', line 56 def keypath @keypath end |
#parameters ⇒ Highway::Compiler::Analyze::Tree::Values::Hash (readonly)
Hash value of step parameters.
46 47 48 |
# File 'lib/highway/compiler/build/output/invocation.rb', line 46 def parameters @parameters end |
#policy ⇒ Symbol (readonly)
Execution policy of the step invocation.
51 52 53 |
# File 'lib/highway/compiler/build/output/invocation.rb', line 51 def policy @policy end |
#step_class ⇒ Class (readonly)
Definition class of the step.
41 42 43 |
# File 'lib/highway/compiler/build/output/invocation.rb', line 41 def step_class @step_class end |
Instance Method Details
#identifier ⇒ String
An identifier of the invocation, joined by index and step name.
61 62 63 |
# File 'lib/highway/compiler/build/output/invocation.rb', line 61 def identifier return "#{index}-#{step_class.name}" end |