lib/messaging/client.rb
def declare_exchange(channel, name, type, options = {})
      exchange =
        # Check if default options need to be supplied to a non-default delcaration
        if default_exchange?(name)
          channel.default_exchange
        else
          channel.send(type, name, options)
        end

      log.debug("Exchange #{exchange.name.inspect} declared")

      exchange
    end
def declare_exchange(channel, name, type, options = {})
      exchange =
        # Check if default options need to be supplied to a non-default delcaration
        if default_exchange?(name)
          channel.default_exchange
        else
          channel.send(type, name, options)
        end

      log.debug("Exchange #{exchange.name.inspect} declared")

      exchange
    end
def declare_exchange ( channel , name , type , options = { } ) exchange = # Check if default options need to be supplied to a non-default delcaration if default_exchange? ( name ) channel . default_exchange else channel . send ( type , name , options ) end log . debug ( "Exchange #{exchange.name.inspect} declared" ) exchange end
Declare an exchange on the specified channel.

 @param channel [AMQP::Channel]
 @param name [String]
 @param type [String]
 @param options [Hash]
 @return [AMQP::Exchange]
 @api public
Declare an exchange on the specified channel .