Proxy
# File lib/active_ldap/association/collection.rb, line 18 def <<(*entries) add_entries(*entries) end
# File lib/active_ldap/association/collection.rb, line 28 def delete(*entries) entries = flatten_deeper(entries).reject do |entry| @target.delete(entry) if entry.new_entry? entry.new_entry? end return if entries.empty? delete_entries(entries) entries.each do |entry| @target.delete(entry) end end
# File lib/active_ldap/association/collection.rb, line 24 def each(&block) to_ary.each(&block) end
# File lib/active_ldap/association/collection.rb, line 62 def exists? load_target not @target.empty? end
# File lib/active_ldap/association/collection.rb, line 41 def replace(others) load_target entry = @target.first if entry.nil? deleted_entries = [] added_entries = others else base_class = entry.class others = others.collect do |other| other = base_class.find(other) unless other.is_a?(base_class) other end deleted_entries = @target - others added_entries = others - @target end delete(deleted_entries) concat(added_entries) end
Generated with the Darkfish Rdoc Generator 2.