Class: Gitlab::Ci::Config::Entry::Variable::ComplexVariable
- Inherits:
-
Gitlab::Config::Entry::Node
- Object
- Gitlab::Config::Entry::Node
- Gitlab::Ci::Config::Entry::Variable::ComplexVariable
- Defined in:
- lib/gitlab/ci/config/entry/variable.rb
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, #deprecation, #description, #key, #metadata, #parent
Class Method Summary collapse
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, #array?, 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
Class Method Details
.applies_to?(config) ⇒ Boolean
46 47 48 |
# File 'lib/gitlab/ci/config/entry/variable.rb', line 46 def applies_to?(config) config.is_a?(Hash) end |
Instance Method Details
#value ⇒ Object
77 78 79 80 |
# File 'lib/gitlab/ci/config/entry/variable.rb', line 77 def value # Needed since the `Entry::Node` provides `value` (which is current hash) config_value.to_s end |
#value_with_data ⇒ Object
82 83 84 85 86 87 |
# File 'lib/gitlab/ci/config/entry/variable.rb', line 82 def value_with_data { value: config_value.to_s, raw: (! if ) }.compact end |
#value_with_prefill_data ⇒ Object
89 90 91 92 93 94 |
# File 'lib/gitlab/ci/config/entry/variable.rb', line 89 def value_with_prefill_data value_with_data.merge( description: config_description, options: ).compact end |