Class: Gitlab::Ci::Matching::BuildMatcher

Inherits:
Object
  • Object
show all
Defined in:
lib/gitlab/ci/matching/build_matcher.rb

Constant Summary collapse

ATTRIBUTES =
%i[
  protected
  tag_list
  build_ids
  project
].freeze

Instance Method Summary collapse

Constructor Details

#initialize(params) ⇒ BuildMatcher

Returns a new instance of BuildMatcher.



17
18
19
20
21
# File 'lib/gitlab/ci/matching/build_matcher.rb', line 17

def initialize(params)
  ATTRIBUTES.each do |attribute|
    instance_variable_set("@#{attribute}", params.fetch(attribute))
  end
end

Instance Method Details

#has_tags?Boolean

Returns:

  • (Boolean)


23
24
25
# File 'lib/gitlab/ci/matching/build_matcher.rb', line 23

def has_tags?
  tag_list.present?
end