Class: Kube::Cluster::Standard::ServiceAccount
- Inherits:
-
Object
- Object
- Kube::Cluster::Standard::ServiceAccount
- Defined in:
- lib/kube/cluster/standard/service_account.rb
Instance Method Summary collapse
-
#initialize(name:, namespace: nil, &block) ⇒ ServiceAccount
constructor
A new instance of ServiceAccount.
- #name ⇒ Object
- #namespace ⇒ Object
Constructor Details
#initialize(name:, namespace: nil, &block) ⇒ ServiceAccount
Returns a new instance of ServiceAccount.
10 11 12 13 14 15 16 |
# File 'lib/kube/cluster/standard/service_account.rb', line 10 def initialize(name:, namespace: nil, &block) super() do .name = name .namespace = namespace if namespace instance_exec(&block) if block end end |
Instance Method Details
#name ⇒ Object
18 19 20 |
# File 'lib/kube/cluster/standard/service_account.rb', line 18 def name to_h.dig(:metadata, :name) end |
#namespace ⇒ Object
22 23 24 |
# File 'lib/kube/cluster/standard/service_account.rb', line 22 def namespace to_h.dig(:metadata, :namespace) end |