Class: CloudDoor::Account
- Defined in:
- lib/cloud_door/account.rb
Constant Summary collapse
- ACCOUNT_FILE =
'account.yml'
- ACCOUNT_ITEMS =
[ 'login_account', 'login_password' ]
Instance Attribute Summary collapse
-
#login_account ⇒ Object
Returns the value of attribute login_account.
-
#login_password ⇒ Object
Returns the value of attribute login_password.
Attributes inherited from CloudYaml
Instance Method Summary collapse
-
#initialize(storage, data_path) ⇒ Account
constructor
A new instance of Account.
- #isset_account? ⇒ Boolean
Methods inherited from CloudYaml
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_account ⇒ Object
Returns the value of attribute login_account.
5 6 7 |
# File 'lib/cloud_door/account.rb', line 5 def login_account @login_account end |
#login_password ⇒ Object
Returns the value of attribute login_password.
5 6 7 |
# File 'lib/cloud_door/account.rb', line 5 def login_password @login_password end |
Instance Method Details
#isset_account? ⇒ Boolean
23 24 25 |
# File 'lib/cloud_door/account.rb', line 23 def isset_account? !(login_account.empty? || login_password.empty?) end |