Class: Nfcollector::Mapping::AfterRowHook

Inherits:
Object
  • Object
show all
Defined in:
lib/nfcollector/mapping/transpiler.rb

Instance Method Summary collapse

Constructor Details

#initialize(processor, indicies) ⇒ AfterRowHook

Represents a hook that is called after each row has been transpiled

Parameters:

  • processor (Object, Class)

    an object or class that responds to the perform method

  • an (Array<Integer>)

    array of indicies from which the processing arguments are taken in the transpiled row



8
9
10
11
# File 'lib/nfcollector/mapping/transpiler.rb', line 8

def initialize(processor, indicies)
  @processor = processor
  @indicies  = indicies
end

Instance Method Details

#perform(mapped_row) ⇒ Object



13
14
15
# File 'lib/nfcollector/mapping/transpiler.rb', line 13

def perform(mapped_row)
  @processor.perform(mapped_row, @indicies)
end