Skip to content

Commit

Permalink
Revert "Different Bank troubleshooting"
Browse files Browse the repository at this point in the history
This reverts commit 64b3fa1.
  • Loading branch information
nilz3ro committed Apr 9, 2014
1 parent 64b3fa1 commit 2dcadf1
Showing 1 changed file with 14 additions and 31 deletions.
45 changes: 14 additions & 31 deletions ruby-scripts/bank.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,48 +5,31 @@ class BankAccount

def initialize(first_name, last_name)

@first_name = first_name
@last_name = last_name
@balance = 0

# make a object of all of the info we need,
# this way it's all in a nice group instead of tons of individual variables

# @attr = Hash.new()

# @attr["first_name"] = first_name
@attr = Hash.new()

# @attr["last_name"] = last_name
@attr["first_name"] = first_name

# @attr["transactions"] = []
@attr["last_name"] = last_name

# @attr["balance"] = 0
@attr["transactions"] = []

end
@attr["balance"] = 0

def balance
puts "Your current balance is $#{@balance}"
@balance
"dougs"
end




def deposit amount = nil
def deposit

puts "How much would you like to deposit?"

amount = gets.chomp unless amount

@balance += amount.to_i

puts "Thanks for the #{amount} dollars ass hole! Now I have #{@balance} mo fo dollars!"
amount = gets.chomp

# # this is a test push to see if i am 'gitting' this software correctly no changes have been made other then this comment
# @attr["balance"] += amount.to_f
# this is a test push to see if i am 'gitting' this software correctly no changes have been made other then this comment
@attr["balance"] += amount.to_f

# @attr["transactions"] << track("deposit")
@attr["transactions"] << track("deposit")

end

Expand Down Expand Up @@ -75,13 +58,13 @@ def track(type)

end

# def balance
def balance

# puts "Your current balance is $#{@attr['balance']}"
puts "Your current balance is $#{@attr['balance']}"

# return @attr["balance"]
return @attr["balance"]

# end
end

def report

Expand Down

0 comments on commit 2dcadf1

Please sign in to comment.