limit potential licenses

This commit is contained in:
Ben Balter 2014-08-16 14:41:40 -04:00
parent 5ba16874e0
commit f67ba15678
1 changed files with 5 additions and 1 deletions

View File

@ -16,8 +16,12 @@ class Licensee
(length - license.length).abs (length - license.length).abs
end end
def potential_licenses
Licensee::Licenses.list.clone.select { |l| length_delta(l) < length }
end
def licenses_sorted def licenses_sorted
Licensee::Licenses.list.clone.sort_by { |l| length_delta(l) } potential_licenses.sort_by { |l| length_delta(l) }
end end
def matches def matches