class Thor::Shell::Basic
def say_status(status, message, log_status = true)
given in log_status, it's used as the color.
in log_status, avoiding the message from being shown. If a Symbol is
method is used frequently by actions, it allows nil or false to be given
Say a status with the given color and appends the message. Since this
def say_status(status, message, log_status = true) return if quiet? || log_status == false spaces = " " * (padding + 1) status = status.to_s.rjust(12) margin = " " * status.length + spaces color = log_status.is_a?(Symbol) ? log_status : :green status = set_color status, color, true if color message = message.to_s.chomp.gsub(/(?<!\A)^/, margin) buffer = "#{status}#{spaces}#{message}\n" stdout.print(buffer) stdout.flush end