Sha256: 12c4f5b223a9b6aa51b26a48008287d4d1fd11ac7b6908d1bc2c5625cc0d40bd

Contents?: true

Size: 199 Bytes

Versions: 3

Compression:

Stored size: 199 Bytes

Contents

# encoding: utf-8
class Calculator
  def push(n)
    @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

3 entries across 3 versions & 1 rubygems

Version Path
cucumber-3.0.1 examples/i18n/hi/lib/calculator.rb
cucumber-3.0.0 examples/i18n/hi/lib/calculator.rb
cucumber-3.0.0.pre.2 examples/i18n/hi/lib/calculator.rb