Sha256: 5b8309f81c05f051dafe9f22b04db7ae0dac0d35c594878041529c1a719a3d74
Contents?: true
Size: 173 Bytes
Versions: 15
Compression:
Stored size: 173 Bytes
Contents
module Enumerable def sum(accumulator = 0, &block) values = block_given? ? map(&block) : self values.inject(accumulator, :+) end unless method_defined? :sum end
Version data entries
15 entries across 15 versions & 3 rubygems