Sha256: a18860d525603cf6da2d8e2cadb15738124b8b7c5e58c58ea6af189a64b7ed48
Contents?: true
Size: 127 Bytes
Versions: 3
Compression:
Stored size: 127 Bytes
Contents
class Calculator def push(n) @args ||= [] @args << n end def add @args.inject(0){|n,sum| sum + n} end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
cucumber-3.0.1 | examples/i18n/zh-CN/lib/calculator.rb |
cucumber-3.0.0 | examples/i18n/zh-CN/lib/calculator.rb |
cucumber-3.0.0.pre.2 | examples/i18n/zh-CN/lib/calculator.rb |