Sha256: e8684e1fddf6f2dcd2f88ee4f86e21293b019d1b5a618887b4f5f05e8d3d444d

Contents?: true

Size: 343 Bytes

Versions: 1

Compression:

Stored size: 343 Bytes

Contents

module MiniCamel
  module Processor
    class Mutate < Base

      values do
        attribute :field, Symbol
        attribute :with_class, Class
      end

      def call(exchange)
        mutation = with_class.new(field => exchange.context_fetch(field)).call
        exchange.update_context(field => mutation)
      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mini_camel-0.5.8 lib/mini_camel/processor/mutate.rb