Sha256: 8ae5cf7a58ca7d5718756dfd74842d33dd5e6dff1f2eebd0399afac75476faf3

Contents?: true

Size: 611 Bytes

Versions: 9

Compression:

Stored size: 611 Bytes

Contents

# frozen_string_literal: true

require "tainbox"
require "active_support/core_ext/class/attribute"

class Rabbit::EventHandler
  include Tainbox

  attribute :project_id
  attribute :data
  attribute :message_info

  class_attribute :queue
  class_attribute :ignore_queue_conversion, default: false

  class << self
    private

    def queue_as(queue = nil, &block)
      self.queue = queue || block
    end
  end

  def initialize(message)
    self.attributes   = message.data
    self.data         = message.data
    self.project_id   = message.project_id
    self.message_info = message.arguments
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
rabbit_messaging-1.0.0 lib/rabbit/event_handler.rb
rabbit_messaging-0.15.0 lib/rabbit/event_handler.rb
rabbit_messaging-0.13.0 lib/rabbit/event_handler.rb
rabbit_messaging-0.12.1 lib/rabbit/event_handler.rb
rabbit_messaging-0.12.0 lib/rabbit/event_handler.rb
rabbit_messaging-0.11.0 lib/rabbit/event_handler.rb
rabbit_messaging-0.10.0 lib/rabbit/event_handler.rb
rabbit_messaging-0.9.0 lib/rabbit/event_handler.rb
rabbit_messaging-0.8.1 lib/rabbit/event_handler.rb