Sha256: 7b0e01c7c480caee83d384bf19f8473e7674ec15a3b27e875cb922ead9088850

Contents?: true

Size: 565 Bytes

Versions: 14

Compression:

Stored size: 565 Bytes

Contents

require 'alephant/publisher/queue/writer'
require 'alephant/publisher/queue/processor/base'

module Alephant
  module Publisher
    module Queue
      class Processor < BaseProcessor
        attr_reader :writer_config

        def initialize(writer_config = {})
          @writer_config = writer_config
        end

        def consume(msg)
          unless msg.nil?
            write msg
            msg.delete
          end
        end

        private

        def write(msg)
          Writer.new(writer_config, msg).run!
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
alephant-publisher-queue-1.4.1 lib/alephant/publisher/queue/processor.rb
alephant-publisher-queue-1.4.0 lib/alephant/publisher/queue/processor.rb
alephant-publisher-queue-1.3.6 lib/alephant/publisher/queue/processor.rb
alephant-publisher-queue-1.3.5 lib/alephant/publisher/queue/processor.rb
alephant-publisher-queue-1.3.4 lib/alephant/publisher/queue/processor.rb
alephant-publisher-queue-1.3.3 lib/alephant/publisher/queue/processor.rb
alephant-publisher-queue-1.3.2 lib/alephant/publisher/queue/processor.rb
alephant-publisher-queue-1.2.2 lib/alephant/publisher/queue/processor.rb
alephant-publisher-queue-1.2.1 lib/alephant/publisher/queue/processor.rb
alephant-publisher-queue-1.2.0 lib/alephant/publisher/queue/processor.rb
alephant-publisher-queue-1.1.0 lib/alephant/publisher/queue/processor.rb
alephant-publisher-queue-1.0.0 lib/alephant/publisher/queue/processor.rb
alephant-publisher-queue-0.1.0 lib/alephant/publisher/queue/processor.rb
alephant-publisher-queue-0.0.1 lib/alephant/publisher/queue/processor.rb