mootoh (owner)

Revisions

gist: 166535 Download_button fork
public
Public Clone URL: git://gist.github.com/166535.git
Embed All Files: show embed
account.rb #
1
2
3
4
5
6
7
8
9
10
# from Beautiful Code Sec 24, p.406
class Account
  def withdraw(n)
    @balance = @balance - n
  end
 
  def deposit(n)
    withdraw(-n)
  end
end