Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
class method
Gem::Licenses.suggestions
suggestions(license)
lib/rubygems/util/licenses.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/lib/rubygems/util/licenses.rb, line 880
def self.suggestions(license)
by_distance = LICENSE_IDENTIFIERS.group_by do |identifier|
levenshtein_distance(identifier, license)
end
lowest = by_distance.keys.min
return unless lowest < license.size
by_distance[lowest]
end
No documentation available