lib/mina/helpers/output.rb in mina-1.2.4 vs lib/mina/helpers/output.rb in mina-1.2.5

- old
+ new

@@ -1,11 +1,13 @@ +# frozen_string_literal: true + module Mina module Helpers module Output def print_line(line) case line - when /^\-+> (.*?)$/ + when /^-+> (.*?)$/ print_status Regexp.last_match[1] when /^! (.*?)$/ print_error Regexp.last_match[1] when /^\$ (.*?)$/ print_command Regexp.last_match[1] @@ -40,11 +42,11 @@ def print_stdout(msg) puts " #{msg}" end - def color(str, c) - ENV['NO_COLOR'] ? str : "\033[#{c}m#{str}\033[0m" + def color(str, color) + ENV['NO_COLOR'] ? str : "\033[#{color}m#{str}\033[0m" end end end end