Class: Gitlab::Kubernetes::Kubeconfig::Entry::Cluster
- Inherits:
-
Object
- Object
- Gitlab::Kubernetes::Kubeconfig::Entry::Cluster
- Defined in:
- lib/gitlab/kubernetes/kubeconfig/entry/cluster.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name:, url:, ca_pem: nil) ⇒ Cluster
constructor
A new instance of Cluster.
- #to_h ⇒ Object
Constructor Details
#initialize(name:, url:, ca_pem: nil) ⇒ Cluster
Returns a new instance of Cluster.
10 11 12 13 14 |
# File 'lib/gitlab/kubernetes/kubeconfig/entry/cluster.rb', line 10 def initialize(name:, url:, ca_pem: nil) @name = name @url = url @ca_pem = ca_pem end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
8 9 10 |
# File 'lib/gitlab/kubernetes/kubeconfig/entry/cluster.rb', line 8 def name @name end |
Instance Method Details
#to_h ⇒ Object
16 17 18 19 20 21 |
# File 'lib/gitlab/kubernetes/kubeconfig/entry/cluster.rb', line 16 def to_h { name: name, cluster: cluster } end |