Method: Net::LDAP::Filter#coalesce

Defined in:
lib/net/ldap/filter.rb

#coalesce(operator) ⇒ Object

– coalesce This is a private helper method for dealing with chains of ANDs and ORs that are longer than two. If BOTH of our branches are of the specified type of joining operator, then return both of them as an array (calling coalesce recursively). If they’re not, then return an array consisting only of self.



235
236
237
238
239
240
241
# File 'lib/net/ldap/filter.rb', line 235

def coalesce operator
  if @op == operator
    [@left.coalesce( operator ), @right.coalesce( operator )]
  else
    [self]
  end
end