lib/net/ldap/pdu.rb
# Definition from RFC 1777 (we're handling application-4 here).
#
# Search Response ::=
#   CHOICE {
#     entry      [APPLICATION 4] SEQUENCE {
#                  objectName     LDAPDN,
#                  attributes     SEQUENCE OF SEQUENCE {
#                    AttributeType,
#                    SET OF AttributeValue
#                  }
#                },
#     resultCode [APPLICATION 5] LDAPResult
#   }
#
# We concoct a search response that is a hash of the returned attribute
# values.
#
# NOW OBSERVE CAREFULLY: WE ARE DOWNCASING THE RETURNED ATTRIBUTE NAMES.
#
# This is to make them more predictable for user programs, but it may not
# be a good idea. Maybe this should be configurable.
Definition from RFC 1777 (we're handling application-4 here).

We concoct a search response that is a hash of the returned attribute
values.

NOW OBSERVE CAREFULLY: WE ARE DOWNCASING THE RETURNED ATTRIBUTE NAMES.

This is to make them more predictable for user programs, but it may not
be a good idea. Maybe this should be configurable.
Definition from RFC 1777 ( we ' re handling application - 4 here ) . We concoct a search response that is a hash of the returned attribute values . NOW OBSERVE CAREFULLY : WE ARE DOWNCASING THE RETURNED ATTRIBUTE NAMES . This is to make them more predictable for user programs but it may not be a good idea . Maybe this should be configurable .
def parse_search_return(sequence)
    sequence.length >= 2 or raise Net::LDAP::PDU::Error, "Invalid Search Response length."
    @search_entry = Net::LDAP::Entry.new(sequence[0])
    sequence[1].each { |seq| @search_entry[seq[0]] = seq[1] }
  end
def parse_search_return ( sequence ) sequence . length >= 2 or raise Net :: LDAP :: PDU :: Error , "Invalid Search Response length." @search_entry = Net :: LDAP :: Entry . new ( sequence [ 0 ] ) sequence [ 1 ] . each { | seq | @search_entry [ seq [ 0 ] ] = seq [ 1 ] } end
Definition from RFC 1777 (we're handling application-4 here).
Definition from RFC 1777 ( we ' re handling application - 4 here ) .
sequence
<not_specific>