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

Inherits:
Object
  • Object
show all
Includes:
_Domain
Defined in:
lib/bbk/amqp/domains/exchange.rb,
sig/bbk/amqp/domains/exchange.rbs

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, exchange) ⇒ Exchange

Returns a new instance of Exchange.

Parameters:

  • (String)
  • (String)


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

#exchangeString (readonly)

Returns the value of attribute exchange.

Returns:

  • (String)


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