Class: Gitlab::Ci::Build::Policy::Specification

Inherits:
Object
  • Object
show all
Defined in:
lib/gitlab/ci/build/policy/specification.rb

Overview

Abstract class that defines an interface of job policy specification.

Used for job's only/except policy configuration.

Direct Known Subclasses

Changes, Kubernetes, Refs, Variables

Constant Summary collapse

UnknownPolicyError =
Class.new(StandardError)

Instance Method Summary collapse

Constructor Details

#initialize(spec) ⇒ Specification

Returns a new instance of Specification.


16
17
18
# File 'lib/gitlab/ci/build/policy/specification.rb', line 16

def initialize(spec)
  @spec = spec
end

Instance Method Details

#satisfied_by?(pipeline, context = nil) ⇒ Boolean

Returns:

  • (Boolean)

Raises:

  • (NotImplementedError)

20
21
22
# File 'lib/gitlab/ci/build/policy/specification.rb', line 20

def satisfied_by?(pipeline, context = nil)
  raise NotImplementedError
end