Class: PiecePipe::Collector

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

Instance Attribute Summary

Attributes inherited from Step

#source

Instance Method Summary collapse

Methods inherited from Step

#to_enum

Constructor Details

#initialize(key) ⇒ Collector

Returns a new instance of Collector.



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

def initialize(key)
  @key = key
end

Instance Method Details

#process(hash) ⇒ Object



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

def process(hash)
  produce hash[@key]
end