Path: | lib/net/ldap/filter.rb |
Last Update: | Thu Jul 05 16:25:09 -0400 2012 |
Class Net::LDAP::Filter is used to constrain LDAP searches. An object of this class is passed to Net::LDAP#search in the parameter :filter.
Net::LDAP::Filter supports the complete set of search filters available in LDAP, including conjunction, disjunction and negation (AND, OR, and NOT). This class supplants the (infamous) RFC 2254 standard notation for specifying LDAP search filters.
Here‘s how to code the familiar "objectclass is present" filter:
f = Net::LDAP::Filter.present("objectclass")
The object returned by this code can be passed directly to the :filter parameter of Net::LDAP#search.
See the individual class and instance methods below for more examples.