Sha256: e7953da2a7226af9a6983d3192c3319e63cd2c17c612752c1ec253bfc9fdbe90

Contents?: true

Size: 711 Bytes

Versions: 1

Compression:

Stored size: 711 Bytes

Contents

module RosettaQueue
  module MessageHandler
    
    module ClassMethods

      attr_reader :destination, :options_hash

      def options(options = {})
        @options_hash = options
      end

      def publishes_to(destination)
        @destination = destination
      end

      def subscribes_to(destination)
        @destination = destination
      end
    end
    
    def self.included(receiver)
      receiver.extend(ClassMethods)
      attr_accessor :adapter_proxy

      def destination
        self.class.destination  
      end
      
      def options_hash
        self.class.options_hash
      end

      def ack
        adapter_proxy.ack unless adapter_proxy.nil?
      end 

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cwyckoff-rosetta_queue-0.3.3 lib/rosetta_queue/message_handler.rb