Module: Mentor::Colorize
Instance Method Summary
collapse
#a_an, #and_sentence, #culprit_line, #home_to_tilde, #indent_lines, #lines_from_file, #or_sentence, #pluralize, #pluralize_words, #terminal_width, #valid_var_name
Instance Method Details
#colorize(line) ⇒ Object
7
8
9
10
11
12
13
14
15
16
|
# File 'lib/helpers/colorize.rb', line 7
def colorize(line)
if line_of_padded_code?(line)
line = color_padded_code(line)
elsif backtrace?(line)
return rainbow(line, :backtrace_line)
end
apply_colors(line)
end
|
#colorize_section ⇒ Object
18
19
20
|
# File 'lib/helpers/colorize.rb', line 18
def colorize_section
@lines.map! { |line| colorize(line) }
end
|