Class: K8y::Kubeconfig::User
- Inherits:
-
Object
- Object
- K8y::Kubeconfig::User
- Defined in:
- lib/k8y/kubeconfig/user.rb
Instance Attribute Summary collapse
-
#auth_info ⇒ Object
readonly
Returns the value of attribute auth_info.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name:, auth_info:) ⇒ User
constructor
A new instance of User.
Constructor Details
#initialize(name:, auth_info:) ⇒ User
Returns a new instance of User.
18 19 20 21 |
# File 'lib/k8y/kubeconfig/user.rb', line 18 def initialize(name:, auth_info:) @name = name @auth_info = auth_info end |
Instance Attribute Details
#auth_info ⇒ Object (readonly)
Returns the value of attribute auth_info.
8 9 10 |
# File 'lib/k8y/kubeconfig/user.rb', line 8 def auth_info @auth_info end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
8 9 10 |
# File 'lib/k8y/kubeconfig/user.rb', line 8 def name @name end |
Class Method Details
.from_hash(hash) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/k8y/kubeconfig/user.rb', line 10 def self.from_hash(hash) user = hash.fetch("user") new( name: hash.fetch("name"), auth_info: AuthInfo.from_hash(user) ) end |