Class: Kubernetes::Container
- Inherits:
-
Object
- Object
- Kubernetes::Container
- Defined in:
- lib/kubernetes/container.rb
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
-
#command ⇒ Object
readonly
Returns the value of attribute command.
-
#image ⇒ Object
readonly
Returns the value of attribute image.
-
#image_pull_policy ⇒ Object
readonly
Returns the value of attribute image_pull_policy.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#termination_message_path ⇒ Object
readonly
Returns the value of attribute termination_message_path.
-
#working_dir ⇒ Object
readonly
Returns the value of attribute working_dir.
Instance Method Summary collapse
-
#initialize(data) ⇒ Container
constructor
A new instance of Container.
Constructor Details
#initialize(data) ⇒ Container
Returns a new instance of Container.
6 7 8 9 10 11 12 13 14 |
# File 'lib/kubernetes/container.rb', line 6 def initialize(data) @name = data.fetch("name") @image = data.fetch("image") @command = data.fetch("command", []) @args = data.fetch("args", []) @working_dir = data.fetch("workingDir", nil) @image_pull_policy = data.fetch("imagePullPolicy") @termination_message_path = data.fetch("terminationMessagePath") end |
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args.
3 4 5 |
# File 'lib/kubernetes/container.rb', line 3 def args @args end |
#command ⇒ Object (readonly)
Returns the value of attribute command.
3 4 5 |
# File 'lib/kubernetes/container.rb', line 3 def command @command end |
#image ⇒ Object (readonly)
Returns the value of attribute image.
3 4 5 |
# File 'lib/kubernetes/container.rb', line 3 def image @image end |
#image_pull_policy ⇒ Object (readonly)
Returns the value of attribute image_pull_policy.
4 5 6 |
# File 'lib/kubernetes/container.rb', line 4 def image_pull_policy @image_pull_policy end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/kubernetes/container.rb', line 3 def name @name end |
#termination_message_path ⇒ Object (readonly)
Returns the value of attribute termination_message_path.
4 5 6 |
# File 'lib/kubernetes/container.rb', line 4 def @termination_message_path end |
#working_dir ⇒ Object (readonly)
Returns the value of attribute working_dir.
3 4 5 |
# File 'lib/kubernetes/container.rb', line 3 def working_dir @working_dir end |