Module: LDAP::Server::MatchingRule::Equality

Included in:
DefaultMatchingClass
Defined in:
lib/ldap/server/match.rb

Overview

Now some things we can mixin to a MatchingRule when needed. Replace ‘normalize’ with a function which gives the canonical version of a value for comparison.

Instance Method Summary collapse

Instance Method Details

#eq(vals, m) ⇒ Object



100
101
102
103
104
105
# File 'lib/ldap/server/match.rb', line 100

def eq(vals, m)
  return false if vals.nil?
  m = normalize(m)
  vals.each { |v| return true if normalize(v) == m }
  return false
end