Module: ActiveLdap::Operations::ClassOnlyUpdate — activeldap - ActiveLdap

Module: ActiveLdap::Operations::ClassOnlyUpdate

Defined in:
lib/active_ldap/operations.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) update(dn, attributes, options = {})



608
609
610
611
612
613
614
615
616
617
618
619
620
621
# File 'lib/active_ldap/operations.rb', line 608

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