class Streamer::Functors::Sum

Sum sums the list using the property provided

Public Instance Methods

call() click to toggle source
# File lib/streamer/functors/sum.rb, line 5
def call
  list.inject(0.0) do |total, item|
    total + item[options.fetch(:property)]
  end
end