Module
Constants
No documentation available
Instance Methods
lib/did_you_mean/core_ext/name_error.rb
View on GitHub
# File tmp/rubies/ruby-3.1.3/lib/did_you_mean/core_ext/name_error.rb, line 24
def corrections
@corrections ||= spell_checker.corrections
end
No documentation available
lib/did_you_mean/core_ext/name_error.rb
View on GitHub
# File tmp/rubies/ruby-3.1.3/lib/did_you_mean/core_ext/name_error.rb, line 6
def original_message
meth = method(:to_s)
while meth.owner.const_defined?(:SKIP_TO_S_FOR_SUPER_LOOKUP)
meth = meth.super_method
end
meth.call
end
No documentation available
lib/did_you_mean/core_ext/name_error.rb
View on GitHub
# File tmp/rubies/ruby-3.1.3/lib/did_you_mean/core_ext/name_error.rb, line 28
def spell_checker
DidYouMean.spell_checkers[self.class.to_s].new(self)
end
No documentation available
#
lib/did_you_mean/core_ext/name_error.rb
View on GitHub
# File tmp/rubies/ruby-3.1.3/lib/did_you_mean/core_ext/name_error.rb, line 14
def to_s
msg = super.dup
suggestion = DidYouMean.formatter.message_for(corrections)
msg << suggestion if !msg.include?(suggestion)
msg
rescue
super
end
No documentation available