Class: LDAP::Filter::Join

Inherits:
Abstract show all
Defined in:
lib/ldap/filter.rb

Overview

Used in the implementation of LDAP::Filter::And and LDAP::Filter::Or. For internal use only.

Direct Known Subclasses

And, Or

Instance Method Summary (collapse)

Methods inherited from Abstract

#&, #inspect, #to_ber, #to_s, #|, #~

Constructor Details

- (Join) initialize(operator, *args)

:nodoc:



141
142
143
# File 'lib/ldap/filter.rb', line 141

def initialize(operator, *args) #:nodoc:
  @array = [operator] + args.map {|arg| LDAP::Filter(arg)}
end

Instance Method Details

- (Object) process



144
145
146
# File 'lib/ldap/filter.rb', line 144

def process
  "(#{@array*''})" if @array.compact.size > 1
end

- (Object) to_net_ldap_filter

:nodoc



147
148
149
# File 'lib/ldap/filter.rb', line 147

def to_net_ldap_filter #:nodoc
  @array[1..-1].inject {|m,o| m.to_net_ldap_filter.send(@array.first,o.to_net_ldap_filter)}
end