def connect
      networks = @networks.reject &:connected?
      
      EventMachine.run do
        load_scripts!
        networks.each &:connect

        EventMachine.error_handler do |exception|
          log.error "#{exception.message ^ :bold} on line #{exception.line.to_s ^ :bold}"
          puts exception.backtrace.join "\n"
        end
      end
    end
def connect
      networks = @networks.reject &:connected?
      
      EventMachine.run do
        load_scripts!
        networks.each &:connect

        EventMachine.error_handler do |exception|
          log.error "#{exception.message ^ :bold} on line #{exception.line.to_s ^ :bold}"
          puts exception.backtrace.join "\n"
        end
      end
    end
Instantiates the client, stores the options, instantiates the networks
 and then loads available scripts.

 @param [Hash] options the options for the client.
 @option options [String] :config_path path to a configuration file.
 @option options [String] :environment the client environment.
 Connect to each network available that is not already connected, then
 proceed to start the run-loop.