Class: Dapp::Kube::Kubernetes::Client::Resource::Base
- Inherits:
-
Object
- Object
- Dapp::Kube::Kubernetes::Client::Resource::Base
show all
- Defined in:
- lib/dapp/kube/kubernetes/client/resource/base.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
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
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
23
24
25
|
# File 'lib/dapp/kube/kubernetes/client/resource/base.rb', line 23
def annotations
metadata.fetch('annotations', {})
end
|
11
12
13
|
# File 'lib/dapp/kube/kubernetes/client/resource/base.rb', line 11
def metadata
spec.fetch('metadata', {})
end
|
#name ⇒ Object
15
16
17
|
# File 'lib/dapp/kube/kubernetes/client/resource/base.rb', line 15
def name
metadata['name']
end
|
#status ⇒ Object
27
28
29
|
# File 'lib/dapp/kube/kubernetes/client/resource/base.rb', line 27
def status
spec.fetch('status', {})
end
|
#uid ⇒ Object
19
20
21
|
# File 'lib/dapp/kube/kubernetes/client/resource/base.rb', line 19
def uid
metadata['uid']
end
|