模块 DidYouMean::NameErrorCheckers

公共类方法

new(exception) 点击切换源代码
# File lib/did_you_mean/spell_checkers/name_error_checkers.rb, line 6
def new(exception)
  case exception.original_message
  when /uninitialized constant/
    ClassNameChecker
  when /undefined local variable or method/,
       /undefined method/,
       /uninitialized class variable/,
       /no member '.*' in struct/
    VariableNameChecker
  else
    NullChecker
  end.new(exception)
end