Skip to content

Instantly share code, notes, and snippets.

@sirramongabriel
Created September 5, 2013 15:39
Show Gist options
  • Select an option

  • Save sirramongabriel/6451897 to your computer and use it in GitHub Desktop.

Select an option

Save sirramongabriel/6451897 to your computer and use it in GitHub Desktop.
# 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