Sha256: 4c57be4d06d3d2527c5845c0d66f8e02c578cf08a7650f246a7e4ac68b9ef422

Contents?: true

Size: 128 Bytes

Versions: 345

Compression:

Stored size: 128 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

345 entries across 341 versions & 31 rubygems

Version Path
cucumber-1.3.19 examples/i18n/zh-CN/lib/calculator.rb
cucumber-2.0.0.rc.4 examples/i18n/zh-CN/lib/calculator.rb
cucumber-2.0.0.rc.3 examples/i18n/zh-CN/lib/calculator.rb
cucumber-2.0.0.rc.2 examples/i18n/zh-CN/lib/calculator.rb
cucumber-2.0.0.rc.1 examples/i18n/zh-CN/lib/calculator.rb
cucumber-1.3.18 examples/i18n/zh-CN/lib/calculator.rb
cucumber-2.0.0.beta.5 examples/i18n/zh-CN/lib/calculator.rb
cucumber-2.0.0.beta.4 examples/i18n/zh-CN/lib/calculator.rb
cucumber-2.0.0.beta.3 examples/i18n/zh-CN/lib/calculator.rb
cucumber-1.3.17 examples/i18n/zh-CN/lib/calculator.rb
cucumber-2.0.0.beta.2 examples/i18n/zh-CN/lib/calculator.rb
cucumber-2.0.0.beta.1 examples/i18n/zh-CN/lib/calculator.rb
aslakhellesoy-cucumber-0.1.10 examples/i18n/zh-CN/lib/calculator.rb
aslakhellesoy-cucumber-0.1.100.1 examples/i18n/zh-CN/lib/calculator.rb
aslakhellesoy-cucumber-0.1.100.2 examples/i18n/zh-CN/lib/calculator.rb
aslakhellesoy-cucumber-0.1.100.3 examples/i18n/zh-CN/lib/calculator.rb
aslakhellesoy-cucumber-0.1.100.4 examples/i18n/zh-CN/lib/calculator.rb
aslakhellesoy-cucumber-0.1.100.5 examples/i18n/zh-CN/lib/calculator.rb
aslakhellesoy-cucumber-0.1.11 examples/i18n/zh-CN/lib/calculator.rb
aslakhellesoy-cucumber-0.1.12 examples/i18n/zh-CN/lib/calculator.rb