    # File lib/amqp/client.rb, line 26
        def self.connect(connection_string_or_options = {}, options = {}, &block)
          opts = case connection_string_or_options
                 when String then
                   parse_connection_uri(connection_string_or_options)
                 when Hash then
                   connection_string_or_options
                 else
                   Hash.new
                 end

          connection = if block
                         AMQP.client.connect(opts.merge(options), &block)
                       else
                         AMQP.client.connect(opts.merge(options))
                       end

          connection.on_open do
            require "amqp/extensions/rabbitmq" if connection.broker.rabbitmq?
          end
          connection
        end