Class: Gitlab::Ci::Config::Entry::Port
- Inherits:
-
Gitlab::Config::Entry::Node
- Object
- Gitlab::Config::Entry::Node
- Gitlab::Ci::Config::Entry::Port
- Includes:
- Gitlab::Config::Entry::Validatable
- Defined in:
- lib/gitlab/ci/config/entry/port.rb
Overview
Entry that represents a configuration of an Image Port.
Constant Summary collapse
- ALLOWED_KEYS =
%i[number protocol name].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
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
Instance Method Details
#name ⇒ Object
32 33 34 |
# File 'lib/gitlab/ci/config/entry/port.rb', line 32 def name value[:name] end |
#number ⇒ Object
24 25 26 |
# File 'lib/gitlab/ci/config/entry/port.rb', line 24 def number value[:number] end |
#protocol ⇒ Object
28 29 30 |
# File 'lib/gitlab/ci/config/entry/port.rb', line 28 def protocol value[:protocol] end |
#value ⇒ Object
36 37 38 39 40 41 |
# File 'lib/gitlab/ci/config/entry/port.rb', line 36 def value return { number: @config } if integer? return @config if hash? {} end |