Sha256: f337dd2436171d195d56e477c588ce177caf612c2be2740e13091046e968653f

Contents?: true

Size: 541 Bytes

Versions: 10

Compression:

Stored size: 541 Bytes

Contents

require 'mercury/fake/metadata'
require 'mercury/received_message'

class Mercury
  class Fake
    class QueuedMessage
      attr_reader :received_msg, :headers
      attr_accessor :delivered, :subscriber

      def initialize(queue, msg, tag, headers, is_ackable)
        metadata = Metadata.new(tag, headers, proc{queue.ack_or_reject_message(self)}, proc{queue.nack(self)})
        @received_msg = ReceivedMessage.new(msg, metadata, is_ackable: is_ackable)
        @headers = headers
        @delivered = false
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
mercury_amqp-0.4.0 lib/mercury/fake/queued_message.rb
mercury_amqp-0.3.0 lib/mercury/fake/queued_message.rb
mercury_amqp-0.2.0 lib/mercury/fake/queued_message.rb
mercury_amqp-0.1.9 lib/mercury/fake/queued_message.rb
mercury_amqp-0.1.7 lib/mercury/fake/queued_message.rb
mercury_amqp-0.1.6 lib/mercury/fake/queued_message.rb
mercury_amqp-0.1.5 lib/mercury/fake/queued_message.rb
mercury_amqp-0.1.4 lib/mercury/fake/queued_message.rb
mercury_amqp-0.1.3 lib/mercury/fake/queued_message.rb
mercury_amqp-0.1.2 lib/mercury/fake/queued_message.rb