Class: Kubernetes::Pod
- Inherits:
-
Object
- Object
- Kubernetes::Pod
- Defined in:
- lib/kubernetes/pod.rb
Instance Attribute Summary collapse
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
-
#spec ⇒ Object
readonly
Returns the value of attribute spec.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(data) ⇒ Pod
constructor
A new instance of Pod.
Constructor Details
#initialize(data) ⇒ Pod
Returns a new instance of Pod.
9 10 11 12 13 |
# File 'lib/kubernetes/pod.rb', line 9 def initialize(data) = Metadata.new(data.fetch("metadata")) @spec = PodSpec.new(data.fetch("spec")) @status = PodStatus.new(data.fetch("status")) end |
Instance Attribute Details
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
7 8 9 |
# File 'lib/kubernetes/pod.rb', line 7 def end |
#spec ⇒ Object (readonly)
Returns the value of attribute spec.
7 8 9 |
# File 'lib/kubernetes/pod.rb', line 7 def spec @spec end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
7 8 9 |
# File 'lib/kubernetes/pod.rb', line 7 def status @status end |
Instance Method Details
#==(other) ⇒ Object
15 16 17 |
# File 'lib/kubernetes/pod.rb', line 15 def ==(other) .uid == other..uid end |