Class: Euston::RabbitMq::HandlerReference

Inherits:
Object
  • Object
show all
Defined in:
lib/euston-rabbitmq/reflection/handler_reference.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(namespace, handler, name) ⇒ HandlerReference

Returns a new instance of HandlerReference.



4
5
6
7
8
# File 'lib/euston-rabbitmq/reflection/handler_reference.rb', line 4

def initialize namespace, handler, name
  @namespace, @handler, @name = namespace, handler, name
  @queue_name = handler.event_queue_name if handler.respond_to? :event_queue_name
  @queue_name = handler.to_s.split('::').pop.underscore if @queue_name.nil?
end

Instance Attribute Details

#handlerObject (readonly)

Returns the value of attribute handler.



10
11
12
# File 'lib/euston-rabbitmq/reflection/handler_reference.rb', line 10

def handler
  @handler
end

#nameObject (readonly)

Returns the value of attribute name.



10
11
12
# File 'lib/euston-rabbitmq/reflection/handler_reference.rb', line 10

def name
  @name
end

#namespaceObject (readonly)

Returns the value of attribute namespace.



10
11
12
# File 'lib/euston-rabbitmq/reflection/handler_reference.rb', line 10

def namespace
  @namespace
end

#queue_nameObject (readonly)

Returns the value of attribute queue_name.



10
11
12
# File 'lib/euston-rabbitmq/reflection/handler_reference.rb', line 10

def queue_name
  @queue_name
end