Class: Gitlab::Ci::Config::Entry::Includes

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

Overview

Entry that represents a list of include.

Constant Summary

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

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

Instance Attribute Summary

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

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

Class Method Summary collapse

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

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

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

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

Constructor Details

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

Class Method Details

.aspectsObject


26
27
28
29
30
31
32
33
34
35
36
# File 'lib/gitlab/ci/config/entry/includes.rb', line 26

def self.aspects
  super.append -> do
    @config = Array.wrap(@config)

    @config.each_with_index do |config, i|
      @entries[i] = ::Gitlab::Config::Entry::Factory.new(Entry::Include)
                      .value(config || {})
                      .create!
    end
  end
end