Class: Gitlab::Ci::Build::Rules::Rule::Clause
- Inherits:
-
Object
- Object
- Gitlab::Ci::Build::Rules::Rule::Clause
- Defined in:
- lib/gitlab/ci/build/rules/rule/clause.rb
Defined Under Namespace
Constant Summary collapse
- UnknownClauseError =
Abstract class that defines an interface of a single job rule specification.
Used for job’s inclusion rules configuration.
Class.new(StandardError)
- ParseError =
Class.new(StandardError)
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(spec) ⇒ Clause
constructor
A new instance of Clause.
- #satisfied_by?(pipeline, context = nil) ⇒ Boolean
Constructor Details
#initialize(spec) ⇒ Clause
Returns a new instance of Clause.
20 21 22 |
# File 'lib/gitlab/ci/build/rules/rule/clause.rb', line 20 def initialize(spec) @spec = spec end |
Class Method Details
.fabricate(type, value) ⇒ Object
16 17 18 |
# File 'lib/gitlab/ci/build/rules/rule/clause.rb', line 16 def self.fabricate(type, value) "#{self}::#{type.to_s.camelize}".safe_constantize&.new(value) end |
Instance Method Details
#satisfied_by?(pipeline, context = nil) ⇒ Boolean
24 25 26 |
# File 'lib/gitlab/ci/build/rules/rule/clause.rb', line 24 def satisfied_by?(pipeline, context = nil) raise NotImplementedError end |