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.
15 16 17 18 19 20 21 22 |
# File 'lib/cloud_door/account.rb', line 15 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.
6 7 8 |
# File 'lib/cloud_door/account.rb', line 6 def login_account @login_account end |
#login_password ⇒ Object
Returns the value of attribute login_password.
6 7 8 |
# File 'lib/cloud_door/account.rb', line 6 def login_password @login_password end |
Instance Method Details
#isset_account? ⇒ Boolean
24 25 26 |
# File 'lib/cloud_door/account.rb', line 24 def isset_account? !(login_account.empty? || login_password.empty?) end |