lib/net/ldap/filter.rb
##
# Join ("&") and intersect ("|") operations are presented in branches.
# That is, the expression <tt>(&(test1)(test2)</tt> has two branches:
# test1 and test2. Each of these is parsed separately and then pushed
# into a branch array for filter merging using the parent operation.
#
# This method calls #parse_branches to generate the branch list and then
# merges them into a single Filter tree by calling the provided
# operation.
Join ("&") and intersect ("|") operations are presented in branches.
That is, the expression (&(test1)(test2) has two branches:
test1 and test2. Each of these is parsed separately and then pushed
into a branch array for filter merging using the parent operation.

This method calls #parse_branches to generate the branch list and then
merges them into a single Filter tree by calling the provided
operation.
Join ( " & " ) and intersect ( " | " ) operations are presented in branches . That is the expression ( & ( test1 ) ( test2 ) has two branches : test1 and test2 . Each of these is parsed separately and then pushed into a branch array for filter merging using the parent operation . This method calls #parse_branches to generate the branch list and then merges them into a single Filter tree by calling the provided operation .
def merge_branches(op, scanner)
      filter = nil
      branches = parse_branches(scanner)
      if branches.size >= 1
        filter = branches.shift
        while not branches.empty?
          filter = filter.__send__(op, branches.shift)
        end
      end
      filter
    end
def merge_branches ( op , scanner ) filter = nil branches = parse_branches ( scanner ) if branches . size >= 1 filter = branches . shift while not branches . empty? filter = filter . __send__ ( op , branches . shift ) end end filter end
Join ("&") and intersect ("|") operations are presented in branches.
Join ( " & " ) and intersect ( " | " ) operations are presented in branches .
op
<not_specific>
scanner
<not_specific>