summaryrefslogtreecommitdiff
path: root/lib/money.rb
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2013-04-30 13:15:32 -0600
committermo khan <mo@mokhan.ca>2013-04-30 13:15:32 -0600
commit9b0079caa80b6d3f7a51cc97fe13ab78c38cd02d (patch)
treee02d09e555b6259e53b541b89ea975cd60f4f5b3 /lib/money.rb
parent9d0e17c02d9d0b1044dcf04cf51c21a94bbd857c (diff)
simple money subtractionHEADmaster
Diffstat (limited to 'lib/money.rb')
-rw-r--r--lib/money.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/money.rb b/lib/money.rb
index 11394e6..0a32f50 100644
--- a/lib/money.rb
+++ b/lib/money.rb
@@ -6,11 +6,11 @@ class Money
end
def +(other)
- plus(other)
+ Money.new(@amount + other.amount)
end
- def plus(other)
- Money.new(@amount + other.amount)
+ def -(other)
+ Money.new(@amount - other.amount)
end
def ==(other)