global
def format_and_highlight_lines(
def format_and_highlight_lines( lines, highlight_color_sym: :exception_color_detail, plain_color_sym: :menu_chrome_color, label: 'Dependencies:', highlight: [], line_prefix: ' ', line_postfix: '' ) formatted_deps = lines&.map do |item| "#{line_prefix}- #{string_send_color(dep_name, highlight.include?(dep_name) ? highlight_color_sym : plain_color_sym)}: #{item}#{line_postfix}" end || [] "#{line_prefix}#{string_send_color(label, highlight_color_sym)}#{line_postfix}\n" + formatted_deps.join("\n") end