Class LDAP::Mod
In: conn.c
lib/ldap/ldif.rb
Parent: Object

Create and manipulate LDAP::Mod objects, which can then be passed to methods in the LDAP::Conn class, such as Conn#add, Conn#add_ext, Conn#modify and Conn#modify_ext.

Methods

inspect   mod_op   mod_type   mod_vals   new   to_ldif   to_s  

Public Class methods

Create a new LDAP::Mod object of type mod_type. This is most commonly LDAP_MOD_ADD, LDAP_MOD_REPLACE or LDAP_MOD_DELETE, although some LDAP servers may offer extension types.

attr should be the name of the attribute on which to operate, whilst vals is an array of values pertaining to attr. If vals contains binary data, mod_type should be logically OR‘ed (|) with LDAP_MOD_BVALUES.

LDAP::Mod objects can be passed to methods in the LDAP::Conn class, such as Conn#add, Conn#add_ext, Conn#modify and Conn#modify_ext.

Public Instance methods

Produce a concise representation of the Mod object.

Return the type of modification associated with the LDAP::Mod object. Standard types are LDAP_MOD_ADD, LDAP_MOD_REPLACE and LDAP_MOD_DELETE, although any of these may be logically OR‘ed with LDAP_MOD_BVALUES to indicate that the values of the Mod object contain binary data.

Return the name of the attribute associated with the LDAP::Mod object.

Return the values associated with the Mod object.

Convert an LDAP::Mod with the DN given in dn to LDIF.

to_s( dn )

Alias for to_ldif

[Validate]