Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
instance method
DidYouMean::TreeSpellChecker#correct
(::String input) -> ::Array[::String]
correct(input)
lib/did_you_mean/tree_spell_checker.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/lib/did_you_mean/tree_spell_checker.rb, line 15
def correct(input)
plausibles = plausible_dimensions(input)
return fall_back_to_normal_spell_check(input) if plausibles.empty?
suggestions = find_suggestions(input, plausibles)
return fall_back_to_normal_spell_check(input) if suggestions.empty?
suggestions
end
No documentation available