Class: MessageQueue::Consumer
- Inherits:
-
Object
- Object
- MessageQueue::Consumer
- Includes:
- OptionsHelper
- Defined in:
- lib/message_queue/consumer.rb
Direct Known Subclasses
Adapters::Bunny::Connection::Consumer, Adapters::Memory::Connection::Consumer
Instance Attribute Summary collapse
-
#connection ⇒ Object
readonly
Returns the value of attribute connection.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(connection, options = {}) ⇒ Consumer
constructor
A new instance of Consumer.
- #load_object(object) ⇒ Object
Methods included from OptionsHelper
Constructor Details
#initialize(connection, options = {}) ⇒ Consumer
Returns a new instance of Consumer.
9 10 11 12 |
# File 'lib/message_queue/consumer.rb', line 9 def initialize(connection, = {}) @connection = connection = deep_clone() end |
Instance Attribute Details
#connection ⇒ Object (readonly)
Returns the value of attribute connection.
7 8 9 |
# File 'lib/message_queue/consumer.rb', line 7 def connection @connection end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
7 8 9 |
# File 'lib/message_queue/consumer.rb', line 7 def end |
Instance Method Details
#load_object(object) ⇒ Object
14 15 16 |
# File 'lib/message_queue/consumer.rb', line 14 def load_object(object) connection.serializer.load(object) end |