Method: Net::LDAP#delete
- Defined in:
- lib/net/ldap.rb
#delete(args) ⇒ Object
Delete an entry from the LDAP directory. Takes a hash of arguments. The only supported argument is :dn, which must give the complete DN of the entry to be deleted.
Returns True or False to indicate whether the delete succeeded. Extended status information is available by calling #get_operation_result.
dn = "[email protected], ou=people, dc=example, dc=com"
ldap.delete :dn => dn
1174 1175 1176 1177 1178 1179 1180 1181 |
# File 'lib/net/ldap.rb', line 1174 def delete(args) instrument "delete.net_ldap", args do |payload| @result = use_connection(args) do |conn| conn.delete(args) end @result.success? end end |