Class: Gitlab::Ci::Config::Entry::Variables
- Inherits:
-
Gitlab::Config::Entry::Node
- Object
- Gitlab::Config::Entry::Node
- Gitlab::Ci::Config::Entry::Variables
- Includes:
- Gitlab::Config::Entry::Validatable
- Defined in:
- lib/gitlab/ci/config/entry/variables.rb
Overview
Entry that represents environment variables.
Constant Summary collapse
- ALLOWED_VALUE_DATA =
%i[value description].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, #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, aspects, #compose!, #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
.default ⇒ Object
24 25 26 |
# File 'lib/gitlab/ci/config/entry/variables.rb', line 24 def self.default(**) {} end |
Instance Method Details
#use_value_data? ⇒ Boolean
32 33 34 |
# File 'lib/gitlab/ci/config/entry/variables.rb', line 32 def use_value_data? opt(:use_value_data) end |
#value ⇒ Object
20 21 22 |
# File 'lib/gitlab/ci/config/entry/variables.rb', line 20 def value @config.to_h { |key, value| [key.to_s, (value)[:value]] } end |
#value_with_data ⇒ Object
28 29 30 |
# File 'lib/gitlab/ci/config/entry/variables.rb', line 28 def value_with_data @config.to_h { |key, value| [key.to_s, (value)] } end |