Module: ActiveLdap::Operations::ClassOnlyUpdate

Defined in:
lib/active_ldap/operations.rb

Instance Method Summary collapse

Instance Method Details

#update(dn, attributes, options = {}) ⇒ Object



628
629
630
631
632
633
634
635
636
637
638
639
640
641
# File 'lib/active_ldap/operations.rb', line 628

def update(dn, attributes, options={})
  if dn.is_a?(Array)
    i = -1
    dns = dn
    dns.collect do |_dn|
      i += 1
      update(_dn, attributes[i], options)
    end
  else
    object = find(dn, options)
    object.update_attributes(attributes)
    object
  end
end