Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
DidYouMean::RequirePathChecker#corrections
() -> ::Array[::String]
corrections
lib/did_you_mean/spell_checkers/require_path_checker.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.4.1/lib/did_you_mean/spell_checkers/require_path_checker.rb, line 29
def corrections
@corrections ||= begin
threshold = path.size * 2
dictionary = self.class.requireables.reject {|str| str.size >= threshold }
spell_checker = path.include?("/") ? TreeSpellChecker : SpellChecker
spell_checker.new(dictionary: dictionary).correct(path).uniq
end
end
No documentation available