Module: DidYouMean::NameErrorCheckers
- Defined in:
- lib/did_you_mean/spell_checkers/name_error_checkers.rb
Class Method Summary collapse
Class Method Details
.included ⇒ Object
6 7 8 |
# File 'lib/did_you_mean/spell_checkers/name_error_checkers.rb', line 6 def self.included(*) raise "Do not include this module since it overrides Class.new method." end |
.new(exception) ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/did_you_mean/spell_checkers/name_error_checkers.rb', line 10 def self.new(exception) case exception. when /uninitialized constant/ ClassNameChecker when /undefined local variable or method/, /undefined method/, /uninitialized class variable/ VariableNameChecker else NullChecker end.new(exception) end |