Class: Conoha::Config::Account

Inherits:
Object
  • Object
show all
Defined in:
lib/conoha/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#passwordObject (readonly)

Returns the value of attribute password.



10
11
12
# File 'lib/conoha/config.rb', line 10

def password
  @password
end

#public_keyObject (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_idObject (readonly)

Returns the value of attribute tenant_id.



10
11
12
# File 'lib/conoha/config.rb', line 10

def tenant_id
  @tenant_id
end

#usernameObject (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_hashObject



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