Spec-Zone.ru › Ruby 3.2

модуль DidYouMean::NameErrorCheckers

Открытые методы класса

new(исключение) Показать исходный код
# 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

Ruby Core © 1993–2022 Yukihiro Matsumoto
Licensed under the Ruby License.
Ruby Standard Library © contributors
Licensed under their own licenses.

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API