# File lib/active_ldap/adapter/net_ldap.rb, line 23
      def connect(options={})
        @bound = false
        super do |host, port, method|
          config = {
            :host => host,
            :port => port,
          }
          config[:encryption] = {:method => method} if method
          begin
            Net::LDAP::Connection.new(config)
          rescue Net::LDAP::LdapError
            raise ConnectionError, $!.message
          end
        end
      end