Class: Leveret::Message
- Inherits:
-
Object
- Object
- Leveret::Message
- Extended by:
- Forwardable
- Defined in:
- lib/leveret/message.rb
Overview
Roll up all of the separate parts of an incoming message into a nice convenient object to move around
Instance Attribute Summary collapse
-
#delivery_info ⇒ Bunny::DeliveryInfo
Full of useful things like the delivery_tag and routing key.
-
#params ⇒ Parameters
Deserialized params.
-
#properties ⇒ Delivery::Properties
Full of useful things like content-type and priority.
Instance Method Summary collapse
-
#initialize(delivery_info, properties, params) ⇒ Message
constructor
A new instance of Message.
Constructor Details
#initialize(delivery_info, properties, params) ⇒ Message
Returns a new instance of Message.
21 22 23 24 25 |
# File 'lib/leveret/message.rb', line 21 def initialize(delivery_info, properties, params) self.delivery_info = delivery_info self.properties = properties self.params = params end |
Instance Attribute Details
#delivery_info ⇒ Bunny::DeliveryInfo
Returns Full of useful things like the delivery_tag and routing key.
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/leveret/message.rb', line 10 class Message extend Forwardable attr_accessor :delivery_info, :properties, :params def_delegators :delivery_info, :delivery_tag, :routing_key def_delegators :properties, :priority # @param [Bunny::DeliveryInfo] delivery_info Full of useful things like the delivery_tag and routing key # @param [Bunny::Properties] properties Full of useful things like content-type and priority # @param [Parameters] Deserialized params parsed from the message def initialize(delivery_info, properties, params) self.delivery_info = delivery_info self.properties = properties self.params = params end end |
#params ⇒ Parameters
Returns Deserialized params.
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/leveret/message.rb', line 10 class Message extend Forwardable attr_accessor :delivery_info, :properties, :params def_delegators :delivery_info, :delivery_tag, :routing_key def_delegators :properties, :priority # @param [Bunny::DeliveryInfo] delivery_info Full of useful things like the delivery_tag and routing key # @param [Bunny::Properties] properties Full of useful things like content-type and priority # @param [Parameters] Deserialized params parsed from the message def initialize(delivery_info, properties, params) self.delivery_info = delivery_info self.properties = properties self.params = params end end |
#properties ⇒ Delivery::Properties
Returns Full of useful things like content-type and priority.
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/leveret/message.rb', line 10 class Message extend Forwardable attr_accessor :delivery_info, :properties, :params def_delegators :delivery_info, :delivery_tag, :routing_key def_delegators :properties, :priority # @param [Bunny::DeliveryInfo] delivery_info Full of useful things like the delivery_tag and routing key # @param [Bunny::Properties] properties Full of useful things like content-type and priority # @param [Parameters] Deserialized params parsed from the message def initialize(delivery_info, properties, params) self.delivery_info = delivery_info self.properties = properties self.params = params end end |