Sha256: d6d59d62cea271adb19c1bf0c9b4db195012a78cdd49328dff6f92c0b36ede5e
Contents?: true
Size: 276 Bytes
Versions: 1
Compression:
Stored size: 276 Bytes
Contents
module Mathy module Operations class Addition < Operation def initialize(verification) super(verification, "+") end def calculate(operands) operands.inject(0) do |result, x| result + x end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
mathy-0.0.1 | lib/mathy/operations/addition.rb |