Module: ActiveLdap::Operations::ClassOnlyDelete

Defined in:
lib/active_ldap/operations.rb

Instance Method Summary collapse

Instance Method Details

#delete(targets, options = {}) ⇒ Object



562
563
564
565
566
567
568
# File 'lib/active_ldap/operations.rb', line 562

def delete(targets, options={})
  targets = [targets] unless targets.is_a?(Array)
  targets = targets.collect do |target|
    ensure_dn_attribute(ensure_base(target))
  end
  delete_entry(targets, options)
end

#destroy(targets, options = {}) ⇒ Object



555
556
557
558
559
560
# File 'lib/active_ldap/operations.rb', line 555

def destroy(targets, options={})
  targets = [targets] unless targets.is_a?(Array)
  targets.each do |target|
    find(target, options).destroy
  end
end