Class: BBK::AMQP::Domains::Exchange

Inherits:
Object
  • Object
show all
Defined in:
lib/bbk/amqp/domains/exchange.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, exchange) ⇒ Exchange

Returns a new instance of Exchange.



9
10
11
12
# File 'lib/bbk/amqp/domains/exchange.rb', line 9

def initialize(name, exchange)
  @name = name
  @exchange = exchange
end

Instance Attribute Details

#exchangeObject (readonly)

Returns the value of attribute exchange.



7
8
9
# File 'lib/bbk/amqp/domains/exchange.rb', line 7

def exchange
  @exchange
end

#nameObject (readonly)

Returns the value of attribute name.



7
8
9
# File 'lib/bbk/amqp/domains/exchange.rb', line 7

def name
  @name
end

Instance Method Details

#call(route) ⇒ Object



14
15
16
# File 'lib/bbk/amqp/domains/exchange.rb', line 14

def call(route)
  BBK::AMQP::RouteInfo.new(exchange, route.routing_key)
end