End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
class method
DidYouMean.correct_error
correct_error(error_class, spell_checker)
lib/did_you_mean.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.0.5/lib/did_you_mean.rb, line 91
def self.correct_error(error_class, spell_checker)
SPELL_CHECKERS[error_class.name] = spell_checker
error_class.prepend(Correctable) unless error_class < Correctable
end
Adds DidYouMean functionality to an error using a given spell checker