debian-mirror-gitlab/lib/gitlab/ci/matching/build_matcher.rb

30 lines
566 B
Ruby
Raw Normal View History

2021-09-04 01:27:46 +05:30
# frozen_string_literal: true
module Gitlab
module Ci
module Matching
class BuildMatcher
ATTRIBUTES = %i[
protected
tag_list
build_ids
project
].freeze
attr_reader(*ATTRIBUTES)
alias_method :protected?, :protected
def initialize(params)
ATTRIBUTES.each do |attribute|
instance_variable_set("@#{attribute}", params.fetch(attribute))
end
end
def has_tags?
tag_list.present?
end
end
end
end
end