Class: Conoha::Config::Account
- Inherits:
-
Object
- Object
- Conoha::Config::Account
- Defined in:
- lib/conoha/config.rb
Instance Attribute Summary collapse
-
#password ⇒ Object
readonly
Returns the value of attribute password.
-
#public_key ⇒ Object
readonly
Returns the value of attribute public_key.
-
#tenant_id ⇒ Object
readonly
Returns the value of attribute tenant_id.
-
#username ⇒ Object
readonly
Returns the value of attribute username.
Instance Method Summary collapse
-
#initialize(h) ⇒ Account
constructor
A new instance of Account.
- #to_hash ⇒ Object
Constructor Details
#initialize(h) ⇒ Account
Returns a new instance of Account.
12 13 14 15 16 17 |
# File 'lib/conoha/config.rb', line 12 def initialize(h) @username = h['username'] @password = h['password'] @tenant_id = h['tenant_id'] @public_key = h['public_key'] end |
Instance Attribute Details
#password ⇒ Object (readonly)
Returns the value of attribute password.
10 11 12 |
# File 'lib/conoha/config.rb', line 10 def password @password end |
#public_key ⇒ Object (readonly)
Returns the value of attribute public_key.
10 11 12 |
# File 'lib/conoha/config.rb', line 10 def public_key @public_key end |
#tenant_id ⇒ Object (readonly)
Returns the value of attribute tenant_id.
10 11 12 |
# File 'lib/conoha/config.rb', line 10 def tenant_id @tenant_id end |
#username ⇒ Object (readonly)
Returns the value of attribute username.
10 11 12 |
# File 'lib/conoha/config.rb', line 10 def username @username end |
Instance Method Details
#to_hash ⇒ Object
19 20 21 22 23 24 25 26 |
# File 'lib/conoha/config.rb', line 19 def to_hash { 'username' => @username, 'password' => @password, 'tenant_id' => @tenant_id, 'public_key' => @public_key, } end |