Class: Liebre::Adapter::Bunny::Exchange

Inherits:
Object
  • Object
show all
Includes:
Interface::Exchange
Defined in:
lib/liebre/adapter/bunny/exchange.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#exchangeObject (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