debian-mirror-gitlab/lib/gitlab/ci/config/entry/rules.rb

27 lines
520 B
Ruby
Raw Normal View History

2019-12-04 20:38:33 +05:30
# frozen_string_literal: true
module Gitlab
module Ci
class Config
module Entry
2021-01-03 14:25:43 +05:30
class Rules < ::Gitlab::Config::Entry::ComposableArray
2019-12-04 20:38:33 +05:30
include ::Gitlab::Config::Entry::Validatable
validations do
validates :config, presence: true
validates :config, type: Array
end
def value
2022-08-13 15:12:31 +05:30
[super].flatten
2019-12-04 20:38:33 +05:30
end
2021-01-03 14:25:43 +05:30
def composable_class
Entry::Rules::Rule
end
2019-12-04 20:38:33 +05:30
end
end
end
end
end