Sha256: 7bae3d8aee4464b8a49ed3c1f0e4a7cbd59efe38445532762c292f97cf953ae0
Contents?: true
Size: 226 Bytes
Versions: 2
Compression:
Stored size: 226 Bytes
Contents
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 end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
aslakhellesoy-cucumber-0.1.3 | examples/calculator/lib/calculator.rb |
aslakhellesoy-cucumber-0.1.4 | examples/calculator/lib/calculator.rb |