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