Module: ActiveLdap::Operations::ClassOnlyUpdate

Defined in:
lib/active_ldap/operations.rb

Instance Method Summary collapse

Instance Method Details

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



611
612
613
614
615
616
617
618
619
620
621
622
623
624
# File 'lib/active_ldap/operations.rb', line 611

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