Class LDAP::Record
In: lib/ldap/ldif.rb
Parent: Object

Record objects are embodiments of LDAP operations. They possess a DN, a change type (LDAP_MOD_ADD, LDAP_MOD_DELETE or LDAP_MOD_REPLACE [any of which can be logically AND‘ed with LDAP_MOD_BVALUES]), a hash of attributes and value arrays, a hash of modification operations (useful only when the change type is LDAP_MOD_REPLACE) and an array of LDAP controls.

The Record class’s primary use is as a transitional medium for LDIF operations parsed by the LDAP::LDIF module. You are unlikely to want to use it in application code.


clean   new   send  


attrs  [R] 
change_type  [R] 
controls  [R] 
dn  [R] 
mods  [R] 

Public Class methods

Public Instance methods

Remove common operational attributes from a Record object. This is useful if you have Record objects formed from LDIF data that contained operational attributes. Using LDAP::Record#send to send such an object to an LDAP server is likely to meet with an exception unless the data is first cleaned.

In addition, attributes with duplicate values are pruned, as this can also result in an exception.

Send the operation embodied in the Record object to the LDAP::Conn object specified in conn.