Class: Euston::RabbitMq::HandlerReference
- Inherits:
-
Object
- Object
- Euston::RabbitMq::HandlerReference
- Defined in:
- lib/euston-rabbitmq/reflection/handler_reference.rb
Instance Attribute Summary collapse
-
#handler ⇒ Object
readonly
Returns the value of attribute handler.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#namespace ⇒ Object
readonly
Returns the value of attribute namespace.
-
#queue_name ⇒ Object
readonly
Returns the value of attribute queue_name.
Instance Method Summary collapse
-
#initialize(namespace, handler, name) ⇒ HandlerReference
constructor
A new instance of HandlerReference.
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
#handler ⇒ Object (readonly)
Returns the value of attribute handler.
10 11 12 |
# File 'lib/euston-rabbitmq/reflection/handler_reference.rb', line 10 def handler @handler end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
10 11 12 |
# File 'lib/euston-rabbitmq/reflection/handler_reference.rb', line 10 def name @name end |
#namespace ⇒ Object (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_name ⇒ Object (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 |