Class: Gitlab::Ci::Config::Interpolation::MatrixInterpolator
- Inherits:
-
Object
- Object
- Gitlab::Ci::Config::Interpolation::MatrixInterpolator
- Defined in:
- lib/gitlab/ci/config/interpolation/matrix_interpolator.rb
Overview
Performs matrix variable interpolation in needs:parallel:matrix configurations. This interpolator specifically handles the ‘$[[ matrix.VARIABLE_NAME ]]` syntax to enable dynamic job dependencies based on matrix values.
Constant Summary collapse
- MATRIX_EXPRESSION_REGEXP =
Gitlab::UntrustedRegexp.new('(\$\[\[\s*matrix\.([a-zA-Z0-9_-]+)\s*\]\])')
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
Instance Method Summary collapse
-
#initialize(matrix_variables) ⇒ MatrixInterpolator
constructor
A new instance of MatrixInterpolator.
- #interpolate(needs_config) ⇒ Object
Constructor Details
#initialize(matrix_variables) ⇒ MatrixInterpolator
Returns a new instance of MatrixInterpolator.
17 18 19 20 |
# File 'lib/gitlab/ci/config/interpolation/matrix_interpolator.rb', line 17 def initialize(matrix_variables) @matrix_variables = matrix_variables || {} @errors = [] end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
15 16 17 |
# File 'lib/gitlab/ci/config/interpolation/matrix_interpolator.rb', line 15 def errors @errors end |
Instance Method Details
#interpolate(needs_config) ⇒ Object
22 23 24 |
# File 'lib/gitlab/ci/config/interpolation/matrix_interpolator.rb', line 22 def interpolate(needs_config) interpolate_value(needs_config) end |