Exception: Mentor::NoMethodDidYouMeanStringLiteralError
Class Method Summary
collapse
Instance Method Summary
collapse
Methods included from Colorize
#colorize, #colorize_section
#a_an, #and_sentence, #culprit_line, #home_to_tilde, #indent_lines, #lines_from_file, #or_sentence, #pluralize, #pluralize_words, #terminal_width, #valid_var_name
Methods inherited from MentorError
error_classes, find, #output
Class Method Details
.can_handle? ⇒ Boolean
5
6
7
8
9
10
11
|
# File 'lib/errors/no_method_did_you_mean_string_literal.rb', line 5
def self.can_handle?
super &&
Mentor.tp.raised_exception.respond_to?(:corrections) &&
Mentor.tp.raised_exception.corrections.any? &&
var_for_method.empty? &&
Mentor.tp.raised_exception.receiver.is_a?(String)
end
|