class Treequel::Filter::PresentItemComponent

A 'present' (attribute=*) component

Constants

DEFAULT_ATTRIBUTE

The default attribute to test for presence if none is specified

Public Class Methods

new( attribute=DEFAULT_ATTRIBUTE ) click to toggle source

Create a new 'presence' item filter component for the given attribute.

# File lib/treequel/filter.rb, line 295
def initialize( attribute=DEFAULT_ATTRIBUTE )
        @attribute = attribute
end

Public Instance Methods

promiscuous?() click to toggle source

Returns true, indicating that this component in a filter will match every entry if its attribute is 'objectClass'.

# File lib/treequel/filter.rb, line 308
def promiscuous?
        return @attribute.to_sym == DEFAULT_ATTRIBUTE
end
to_s() click to toggle source

Stringify the component

# File lib/treequel/filter.rb, line 301
def to_s
        return @attribute.to_s + '=*'
end