Class: Winnow::Matcher
- Inherits:
-
Object
- Object
- Winnow::Matcher
- Defined in:
- lib/winnow/matcher.rb
Class Method Summary collapse
Class Method Details
.find_matches(fingerprints_a, fingerprints_b, params = {}) ⇒ Object
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/winnow/matcher.rb', line 4 def find_matches(fingerprints_a, fingerprints_b, params = {}) whitelist = params[:whitelist] || [] matched_values = fingerprints_a.keys & fingerprints_b.keys - whitelist matched_values.map do |value| matches_a, matches_b = fingerprints_a[value], fingerprints_b[value] MatchDatum.new(matches_a, matches_b) end end |