examples/calculator/lib/calculator.rb in aslakhellesoy-cucumber-0.1.2 vs examples/calculator/lib/calculator.rb in aslakhellesoy-cucumber-0.1.3
- old
+ new
@@ -1,18 +1,16 @@
class Calculator
def push(n)
+ n += 2 if n == 0 # a really stupiud bug
+
@args ||= []
@args << n
end
def add
@args.inject(0){|n,sum| sum+=n}
end
def divide
@args[0].to_f / @args[1].to_f
- end
-
- def rain?(day)
- true
end
end
\ No newline at end of file