Class: PiecePipe::MapStep

Inherits:
Step
  • Object
show all
Defined in:
lib/piece_pipe/map_step.rb

Instance Attribute Summary

Attributes inherited from Step

#source

Instance Method Summary collapse

Methods inherited from Step

#to_enum

Instance Method Details

#emit(key, value) ⇒ Object



11
12
13
# File 'lib/piece_pipe/map_step.rb', line 11

def emit(key, value)
  produce key: key, value: value
end

#map(item) ⇒ Object



7
8
9
# File 'lib/piece_pipe/map_step.rb', line 7

def map(item)
  emit item, item
end

#process(item) ⇒ Object



3
4
5
# File 'lib/piece_pipe/map_step.rb', line 3

def process(item)
  map item
end