Class: Rabbit::Receiving::Queue
- Inherits:
-
Object
- Object
- Rabbit::Receiving::Queue
- Defined in:
- lib/rabbit/receiving/queue.rb
Instance Attribute Summary collapse
-
#arguments ⇒ Object
readonly
Returns the value of attribute arguments.
-
#handler ⇒ Object
readonly
Returns the value of attribute handler.
-
#ignore_conversion ⇒ Object
readonly
Returns the value of attribute ignore_conversion.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#queue_name ⇒ Object
readonly
Returns the value of attribute queue_name.
Instance Method Summary collapse
-
#initialize(raw_message, arguments) ⇒ Queue
constructor
A new instance of Queue.
- #name ⇒ Object
Constructor Details
#initialize(raw_message, arguments) ⇒ Queue
Returns a new instance of Queue.
12 13 14 15 16 17 18 |
# File 'lib/rabbit/receiving/queue.rb', line 12 def initialize(, arguments) @message = Rabbit::Receiving::Message.build(, arguments) @handler = Rabbit::Receiving::HandlerResolver.handler_for() @arguments = arguments @queue_name = resolved_queue_name @ignore_conversion = handler.ignore_queue_conversion end |
Instance Attribute Details
#arguments ⇒ Object (readonly)
Returns the value of attribute arguments.
8 9 10 |
# File 'lib/rabbit/receiving/queue.rb', line 8 def arguments @arguments end |
#handler ⇒ Object (readonly)
Returns the value of attribute handler.
8 9 10 |
# File 'lib/rabbit/receiving/queue.rb', line 8 def handler @handler end |
#ignore_conversion ⇒ Object (readonly)
Returns the value of attribute ignore_conversion.
8 9 10 |
# File 'lib/rabbit/receiving/queue.rb', line 8 def ignore_conversion @ignore_conversion end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
8 9 10 |
# File 'lib/rabbit/receiving/queue.rb', line 8 def @message end |
#queue_name ⇒ Object (readonly)
Returns the value of attribute queue_name.
8 9 10 |
# File 'lib/rabbit/receiving/queue.rb', line 8 def queue_name @queue_name end |
Instance Method Details
#name ⇒ Object
20 21 22 23 24 25 26 27 28 |
# File 'lib/rabbit/receiving/queue.rb', line 20 def name if queue_name calculated_queue_name else Rabbit.default_queue_name(ignore_conversion: ignore_conversion) end rescue Rabbit.default_queue_name end |