Class: Gitlab::Ci::Config::Entry::Needs

Inherits:
Gitlab::Config::Entry::ComposableArray show all
Includes:
Gitlab::Config::Entry::Validatable
Defined in:
lib/gitlab/ci/config/entry/needs.rb

Overview

Entry that represents a set of needs dependencies.

Constant Summary collapse

NEEDS_CROSS_PIPELINE_DEPENDENCIES_LIMIT =
5

Constants inherited from Gitlab::Config::Entry::Node

Gitlab::Config::Entry::Node::InvalidError

Instance Attribute Summary

Attributes inherited from Gitlab::Config::Entry::Node

#config, #default, #deprecation, #description, #key, #metadata, #parent

Instance Method Summary collapse

Methods included from Gitlab::Config::Entry::Validatable

#compose!, #errors, included, #validate, #validator

Methods inherited from Gitlab::Config::Entry::ComposableArray

#compose!, #descendants

Methods included from Utils::StrongMemoize

#clear_memoization, #strong_memoize, #strong_memoized?

Methods inherited from Gitlab::Config::Entry::Node

#[], #add_warning, #ancestors, aspects, #compose!, default, #descendants, #errors, #hash?, #initialize, #inspect, #integer?, #leaf?, #location, #opt, #relevant?, #specified?, #string?, #valid?, #warnings, with_aspect

Constructor Details

This class inherits a constructor from Gitlab::Config::Entry::Node

Instance Method Details

#composable_classObject


50
51
52
# File 'lib/gitlab/ci/config/entry/needs.rb', line 50

def composable_class
  Entry::Need
end

#valueObject


43
44
45
46
47
48
# File 'lib/gitlab/ci/config/entry/needs.rb', line 43

def value
  values = @entries.select(&:type)
  values.group_by(&:type).transform_values do |values|
    values.map(&:value)
  end
end