Class: CloudDoor::Account

Inherits:
CloudYaml show all
Defined in:
lib/cloud_door/account.rb

Constant Summary collapse

ACCOUNT_FILE =
'account.yml'
ACCOUNT_ITEMS =
[
  'login_account',
  'login_password'
]

Instance Attribute Summary collapse

Attributes inherited from CloudYaml

#file, #items, #storage

Instance Method Summary collapse

Methods inherited from CloudYaml

#load_yaml, #update_yaml

Constructor Details

#initialize(storage, data_path) ⇒ Account

Returns a new instance of Account.



14
15
16
17
18
19
20
21
# File 'lib/cloud_door/account.rb', line 14

def initialize(storage, data_path)
  @storage        = storage
  @file           = data_path + ACCOUNT_FILE
  @items          = ACCOUNT_ITEMS
  @login_account  = ''
  @login_password = ''
  load_yaml
end

Instance Attribute Details

#login_accountObject

Returns the value of attribute login_account.



5
6
7
# File 'lib/cloud_door/account.rb', line 5

def 
  @login_account
end

#login_passwordObject

Returns the value of attribute login_password.



5
6
7
# File 'lib/cloud_door/account.rb', line 5

def 
  @login_password
end

Instance Method Details

#isset_account?Boolean

Returns:

  • (Boolean)


23
24
25
# File 'lib/cloud_door/account.rb', line 23

def isset_account?
  !(.empty? || .empty?)
end