Class: MiniCamel::Processor::MutateEach

Inherits:
ProcessEach show all
Defined in:
lib/mini_camel/processor/mutate_each.rb

Instance Method Summary collapse

Instance Method Details

#call(exchange) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/mini_camel/processor/mutate_each.rb', line 5

def call(exchange)
  additional_data = fetch_additional_data(exchange)

  fetch_collection(exchange).map! do |entry|
    process(entry, additional_data)
  end
end