Sha256: 1d5b96d05ed0b45aa7928000709424d8b066bceff03ac7583c7b2d928c7b5c5e

Contents?: true

Size: 482 Bytes

Versions: 12

Compression:

Stored size: 482 Bytes

Contents

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

module Alephant
  module Publisher
    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

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

    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
alephant-publisher-0.6.10 lib/alephant/publisher/processor.rb
alephant-publisher-0.6.9 lib/alephant/publisher/processor.rb
alephant-publisher-0.6.8 lib/alephant/publisher/processor.rb
alephant-publisher-0.6.7 lib/alephant/publisher/processor.rb
alephant-publisher-0.6.6 lib/alephant/publisher/processor.rb
alephant-publisher-0.6.5 lib/alephant/publisher/processor.rb
alephant-publisher-0.6.4 lib/alephant/publisher/processor.rb
alephant-publisher-0.6.3 lib/alephant/publisher/processor.rb
alephant-publisher-0.6.2 lib/alephant/publisher/processor.rb
alephant-publisher-0.6.1 lib/alephant/publisher/processor.rb
alephant-publisher-0.5.1 lib/alephant/publisher/processor.rb
alephant-publisher-0.5.0 lib/alephant/publisher/processor.rb