Module: ActiveLdap::Operations::Find
- Defined in:
- lib/active_ldap/operations.rb
Instance Method Summary collapse
-
#all(*args) ⇒ Object
This is an alias for find(:all).
-
#find(*args) ⇒ Object
find.
-
#first(*args) ⇒ Object
A convenience wrapper for
find(:first, *args)
. -
#last(*args) ⇒ Object
A convenience wrapper for
find(:last, *args)
.
Instance Method Details
#all(*args) ⇒ Object
This is an alias for find(:all). You can pass in all the same arguments to this method as you can to find(:all)
252 253 254 |
# File 'lib/active_ldap/operations.rb', line 252 def all(*args) find(:all, *args) end |
#find(*args) ⇒ Object
find
Finds the first match for value where |value| is the value of some |field|, or the wildcard match. This is only useful for derived classes. usage: Subclass.find(:all, :attribute => “cn”, :value => “some*val”)
Subclass.find(:all, 'some*val')
217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 |
# File 'lib/active_ldap/operations.rb', line 217 def find(*args) = (args) args = [:first] if args.empty? and !.empty? case args.first when :first [:value] ||= args[1] find_initial() when :last [:value] ||= args[1] find_last() when :all [:value] ||= args[1] find_every() else find_from_dns(args, ) end end |
#first(*args) ⇒ Object
A convenience wrapper for find(:first, *args)
. You can pass in all the same arguments to this method as you can to find(:first)
.
238 239 240 |
# File 'lib/active_ldap/operations.rb', line 238 def first(*args) find(:first, *args) end |
#last(*args) ⇒ Object
A convenience wrapper for find(:last, *args)
. You can pass in all the same arguments to this method as you can to find(:last)
.
245 246 247 |
# File 'lib/active_ldap/operations.rb', line 245 def last(*args) find(:last, *args) end |