Sha256: 154a82a1792dc07ca2f91f792569e0628d6a0e8f5f5a990e7d543ba0cf0c99cf

Contents?: true

Size: 540 Bytes

Versions: 3

Compression:

Stored size: 540 Bytes

Contents

# frozen_string_literal: true

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

class Rabbit::EventHandler
  include Tainbox

  attribute :project_id
  attr_accessor :data
  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
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rabbit_messaging-0.7.1 lib/rabbit/event_handler.rb
rabbit_messaging-0.7.0 lib/rabbit/event_handler.rb
rabbit_messaging-0.6.0 lib/rabbit/event_handler.rb