Object
# File did_you_mean/spell_checkers/name_error_checkers/class_name_checker.rb, line 20 def class_names scopes.flat_map do |scope| scope.constants.map do |c| ClassName.new(c, scope == Object ? "" : "#{scope}::") end end end
# File did_you_mean/spell_checkers/name_error_checkers/class_name_checker.rb, line 13 def corrections @corrections ||= SpellChecker.new(dictionary: class_names) .correct(class_name) .map(&:full_name) .reject {|qualified_name| @original_message.include?(qualified_name) } end