mirror of https://github.com/licensee/licensee.git
drop .to_h, fixes #7
This commit is contained in:
parent
2a24dff3b4
commit
e8bae208fa
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue