Sha256: 301ca0b423261cfc349029ee1333d9a8444a966bbb645f6c3ace0cf5498eca6a
Contents?: true
Size: 225 Bytes
Versions: 5
Compression:
Stored size: 225 Bytes
Contents
class Calculator def push(n) n += 2 if n == 0 # a really stupid 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
5 entries across 4 versions & 2 rubygems