Class: OodCore::Job::Adapters::Kubernetes::Resources::ConfigMap
- Inherits:
-
Object
- Object
- OodCore::Job::Adapters::Kubernetes::Resources::ConfigMap
- Defined in:
- lib/ood_core/job/adapters/kubernetes/resources.rb
Overview
Utility class for kubernetes configmap objects.
Instance Attribute Summary collapse
-
#files ⇒ Object
Returns the value of attribute files.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
- #init_mounts? ⇒ Boolean
-
#initialize(name, files) ⇒ ConfigMap
constructor
A new instance of ConfigMap.
- #mounts? ⇒ Boolean
Constructor Details
#initialize(name, files) ⇒ ConfigMap
Returns a new instance of ConfigMap.
6 7 8 9 10 11 12 |
# File 'lib/ood_core/job/adapters/kubernetes/resources.rb', line 6 def initialize(name, files) @name = name @files = [] files.each do |f| @files << ConfigMapFile.new(f) end end |
Instance Attribute Details
#files ⇒ Object
Returns the value of attribute files.
4 5 6 |
# File 'lib/ood_core/job/adapters/kubernetes/resources.rb', line 4 def files @files end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/ood_core/job/adapters/kubernetes/resources.rb', line 4 def name @name end |
Instance Method Details
#init_mounts? ⇒ Boolean
18 19 20 |
# File 'lib/ood_core/job/adapters/kubernetes/resources.rb', line 18 def init_mounts? @files.any? { |f| f.init_mount_path } end |
#mounts? ⇒ Boolean
14 15 16 |
# File 'lib/ood_core/job/adapters/kubernetes/resources.rb', line 14 def mounts? @files.any? { |f| f.mount_path } end |