# File lib/ldap/ldif.rb, line 36 def send( conn ) if @change_type == :MODRDN # TODO: How do we deal with 'newsuperior'? # The LDAP API's ldap_modrdn2_s() function doesn't seem to use it. return conn.modrdn( @dn, @attrs['newrdn'], @attrs['deleteoldrdn'] ) end # Mask out the LDAP_MOD_BVALUES bit, as it's irrelevant here. case @change_type & ~LDAP_MOD_BVALUES when LDAP_MOD_ADD @controls == [] ? conn.add( @dn, @attrs ) : conn.add_ext( @dn, @attrs, @controls, [] ) when LDAP_MOD_DELETE @controls == [] ? conn.delete( @dn ) : conn.delete_ext( @dn, @controls, [] ) when LDAP_MOD_REPLACE @controls == [] ? conn.modify( @dn, @mods ) : conn.modify_ext( @dn, @mods, @controls, [] ) end self end