Class: Gitlab::Ci::Config::Entry::Need::JobHash

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

Constant Summary collapse

ALLOWED_KEYS =
%i[job artifacts].freeze

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

Instance 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, 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

#typeObject


44
45
46
# File 'lib/gitlab/ci/config/entry/need.rb', line 44

def type
  :job
end

#valueObject


48
49
50
# File 'lib/gitlab/ci/config/entry/need.rb', line 48

def value
  { name: job, artifacts: artifacts || artifacts.nil? }
end