Class: Gitlab::Ci::Config::Interpolation::Functions::Base
- Inherits:
-
Object
- Object
- Gitlab::Ci::Config::Interpolation::Functions::Base
- Defined in:
- lib/gitlab/ci/config/interpolation/functions/base.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
Class Method Summary collapse
Instance Method Summary collapse
- #execute(_input_value) ⇒ Object
-
#initialize(function_expression, ctx) ⇒ Base
constructor
A new instance of Base.
- #valid? ⇒ Boolean
Constructor Details
#initialize(function_expression, ctx) ⇒ Base
Returns a new instance of Base.
23 24 25 26 27 |
# File 'lib/gitlab/ci/config/interpolation/functions/base.rb', line 23 def initialize(function_expression, ctx) @errors = [] @function_args = parse_args(function_expression) @ctx = ctx end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
9 10 11 |
# File 'lib/gitlab/ci/config/interpolation/functions/base.rb', line 9 def errors @errors end |
Class Method Details
.function_expression_pattern ⇒ Object
11 12 13 |
# File 'lib/gitlab/ci/config/interpolation/functions/base.rb', line 11 def self.function_expression_pattern raise NotImplementedError end |
.matches?(function_expression) ⇒ Boolean
19 20 21 |
# File 'lib/gitlab/ci/config/interpolation/functions/base.rb', line 19 def self.matches?(function_expression) function_expression_pattern.match?(function_expression) end |
.name ⇒ Object
15 16 17 |
# File 'lib/gitlab/ci/config/interpolation/functions/base.rb', line 15 def self.name raise NotImplementedError end |
Instance Method Details
#execute(_input_value) ⇒ Object
33 34 35 |
# File 'lib/gitlab/ci/config/interpolation/functions/base.rb', line 33 def execute(_input_value) raise NotImplementedError end |
#valid? ⇒ Boolean
29 30 31 |
# File 'lib/gitlab/ci/config/interpolation/functions/base.rb', line 29 def valid? errors.empty? end |