Class: Dapp::Kube::Kubernetes::Client::Resource::Base
- Inherits:
-
Object
- Object
- Dapp::Kube::Kubernetes::Client::Resource::Base
- Defined in:
- lib/dapp/kube/kubernetes/client/resource/base.rb
Instance Attribute Summary collapse
-
#spec ⇒ Object
readonly
Returns the value of attribute spec.
Instance Method Summary collapse
- #annotations ⇒ Object
-
#initialize(spec) ⇒ Base
constructor
A new instance of Base.
- #name ⇒ Object
Constructor Details
#initialize(spec) ⇒ Base
Returns a new instance of Base.
7 8 9 |
# File 'lib/dapp/kube/kubernetes/client/resource/base.rb', line 7 def initialize(spec) @spec = spec end |
Instance Attribute Details
#spec ⇒ Object (readonly)
Returns the value of attribute spec.
5 6 7 |
# File 'lib/dapp/kube/kubernetes/client/resource/base.rb', line 5 def spec @spec end |
Instance Method Details
#annotations ⇒ Object
15 16 17 |
# File 'lib/dapp/kube/kubernetes/client/resource/base.rb', line 15 def annotations spec.fetch('metadata', {}).fetch('annotations', {}) end |
#name ⇒ Object
11 12 13 |
# File 'lib/dapp/kube/kubernetes/client/resource/base.rb', line 11 def name spec.fetch('metadata', {})['name'] end |