drop .to_h, fixes #7

This commit is contained in:
Ben Balter 2014-10-02 13:03:28 -04:00
parent 2a24dff3b4
commit e8bae208fa
1 changed files with 2 additions and 2 deletions

View File

@ -34,13 +34,13 @@ class Licensee
end
def matches
@matches ||= potential_licenses.map { |l| [l, blob.similarity(l.hashsig)] }.to_h
@matches ||= potential_licenses.map { |l| [l, blob.similarity(l.hashsig)] }
end
def match_info
@match_info ||= matches.max_by { |l, sim| sim }
end
def match
match_info ? match_info[0] : nil
end