Method: Net::LDAP#delete_attribute
- Defined in:
- lib/net/ldap.rb
#delete_attribute(dn, attribute) ⇒ Object
Delete an attribute and all its values. Takes the full DN of the entry to modify, and the name (Symbol or String) of the attribute to delete.
Returns True or False to indicate whether the operation succeeded or failed, with extended information available by calling #get_operation_result. See also #add_attribute and #replace_attribute.
dn = "cn=modifyme, dc=example, dc=com"
ldap.delete_attribute dn, :mail
1148 1149 1150 |
# File 'lib/net/ldap.rb', line 1148 def delete_attribute(dn, attribute) modify(:dn => dn, :operations => [[:delete, attribute, nil]]) end |