print.rb: added .warn and bright_yellow text colouring

This commit is contained in:
thomashaw
2017-08-16 13:11:33 +01:00
parent b25c3818a4
commit ed31b4bf0f

View File

@@ -11,6 +11,7 @@ class Print
def self.purple(text); colorize(text, "\e[35m"); end
def self.cyan(text); colorize(text, "\e[36m"); end
def self.grey(text); colorize(text, "\e[37m"); end
def self.bright_yellow(text); colorize(text, "\e[93m"); end
def self.bold(text); colorize(text, "\e[2m"); end
def self.debug(msg)
@@ -33,6 +34,10 @@ class Print
puts yellow(msg)
end
def self.warn(msg)
puts bright_yellow(msg)
end
# local encoders/generators write messages to stderr (stdout used to return values)
def self.local(msg)
$stderr.puts cyan(msg)