class Rebuild::Logger
Constants
- COLOR_CODE
Public Class Methods
fatal(text)
click to toggle source
# File lib/rebuild/logger.rb, line 20 def fatal(text) puts red("Error: #{text}") exit 1 end
finish(text)
click to toggle source
# File lib/rebuild/logger.rb, line 16 def finish(text) puts cyan(text) end
info(text)
click to toggle source
# File lib/rebuild/logger.rb, line 12 def info(text) puts green(text) end
Private Class Methods
color_with(text, color)
click to toggle source
# File lib/rebuild/logger.rb, line 39 def color_with(text, color) "\e[#{COLOR_CODE[color]}m#{text}\e[0m" end
cyan(text)
click to toggle source
# File lib/rebuild/logger.rb, line 35 def cyan(text) color_with(text, :cyan) end
green(text)
click to toggle source
# File lib/rebuild/logger.rb, line 31 def green(text) color_with(text, :green) end
red(text)
click to toggle source
# File lib/rebuild/logger.rb, line 27 def red(text) color_with(text, :red) end