Class: Liebre::Adapter::Bunny::Exchange
- Inherits:
-
Object
- Object
- Liebre::Adapter::Bunny::Exchange
- Includes:
- Interface::Exchange
- Defined in:
- lib/liebre/adapter/bunny/exchange.rb
Instance Attribute Summary collapse
-
#exchange ⇒ Object
readonly
Returns the value of attribute exchange.
Instance Method Summary collapse
-
#initialize(exchange) ⇒ Exchange
constructor
A new instance of Exchange.
- #publish(payload, opts = {}) ⇒ Object
Constructor Details
#initialize(exchange) ⇒ Exchange
Returns a new instance of Exchange.
9 10 11 |
# File 'lib/liebre/adapter/bunny/exchange.rb', line 9 def initialize exchange @exchange = exchange end |
Instance Attribute Details
#exchange ⇒ Object (readonly)
Returns the value of attribute exchange.
7 8 9 |
# File 'lib/liebre/adapter/bunny/exchange.rb', line 7 def exchange @exchange end |
Instance Method Details
#publish(payload, opts = {}) ⇒ Object
13 14 15 |
# File 'lib/liebre/adapter/bunny/exchange.rb', line 13 def publish payload, opts = {} exchange.publish(payload, opts) end |