Created
September 5, 2013 15:39
-
-
Save sirramongabriel/6451897 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # interact.rb | |
| require_relative 'account.rb' | |
| class Interact | |
| def start_transaction(transaction_type, current_balance) | |
| puts "#{@greeting} Please type 'balance', 'withdraw', or 'deposit' to begin your transaction." | |
| grab_trans_type = gets.chomp | |
| case transaction_type | |
| when 'balance' | |
| puts "Your current account balance is #{Account.balance}, thank you." | |
| when 'withdraw' | |
| puts "Enter the ammount you wish to withdraw from your account." | |
| amount = gets.chomp | |
| withdraw_method(amount) | |
| when 'deposit' | |
| puts "Enter the ammount you wish to deposit into your account." | |
| ammount = gets.chomp | |
| @deposit | |
| end | |
| end | |
| end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment