-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wave 3 Bank Accounts #67
base: jln/master
Are you sure you want to change the base?
Conversation
…comodate money_market_acct
accounts_csv.each do |id, balance, date| | ||
balance = balance.to_f.round(2)/100 | ||
date = DateTime.strptime(date, "%Y-%m-%d %H:%M:%S %z") | ||
id = Bank::Account.new(id, balance ,date) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would advise against using the id
variable again here since it now stores an account variable rather than an identifier
# Finds the account with the ID that matches the passed parameter and returns the instance | ||
def self.find(id_search) | ||
# Looks in @accounts array for a matching ID value | ||
found = @accounts.find do |account| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the all
method is not called before the find
method is called then this method will not have the @account
variable stored
Added SavingsAccount, CheckingAccount, and MoneyMarketAccount.
CSV is required.