Class: MapRedus::Adder

Inherits:
Reducer show all
Defined in:
lib/mapredus/default_classes.rb

Overview

REDUCERS####################################

Constant Summary

Constants inherited from Reducer

Reducer::DEFAULT_WAIT

Class Method Summary collapse

Methods inherited from Reducer

perform, reduce_perform, wait

Methods inherited from QueueProcess

perform, queue

Class Method Details

.reduce(value_list) {|value_list.reduce(0) { |r, v| r += v.to_i }| ... } ⇒ Object

Yields:

  • (value_list.reduce(0) { |r, v| r += v.to_i })


32
33
34
# File 'lib/mapredus/default_classes.rb', line 32

def self.reduce(value_list)
  yield( value_list.reduce(0) { |r, v| r += v.to_i } )
end