Class: MapRedus::WordCounter
- Inherits:
-
Mapper
- Object
- QueueProcess
- Mapper
- MapRedus::WordCounter
- Defined in:
- lib/mapredus/default_classes.rb
Class Method Summary collapse
Methods inherited from Mapper
Methods inherited from QueueProcess
Class Method Details
.map(map_data) ⇒ Object
21 22 23 24 25 26 |
# File 'lib/mapredus/default_classes.rb', line 21 def self.map(map_data) map_data.split(/\W/).each do |word| next if word.empty? yield(word.downcase, 1) end end |