Sha256: 5e765843969add0abffb54b2d2f42e02f1e17c11d0196e5c620930ad67ca24b6
Contents?: true
Size: 485 Bytes
Versions: 1
Compression:
Stored size: 485 Bytes
Contents
module MiniCamel module Processor class ExtractResult < Base values do attribute :from, Symbol end def call(exchange) result = exchange.context_fetch(from) unless result.kind_of?(MiniCamel::Dto) || result.kind_of?(Hash) raise ArgumentError, "Extracted result is not a DTO or a hash!" end exchange_result = ExchangeResult.new(result) exchange.set_result(exchange_result) 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/extract_result.rb |