inspec/lib/vulcano/log.rb
Dominik Richter 1a05865d6e feature: print number of rules checked
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-06-16 23:33:27 +02:00

30 lines
No EOL
533 B
Ruby

# Copyright 2015 Dominik Richter. All rights reserved.
require 'rainbow/ext/string'
module Vulcano
class Log
def initialize opts = {}
@quiet = opts[:quiet] || false
end
def show msg
puts msg unless @quiet
end
def info msg
show " . ".color(:white) + msg
end
def error msg
show "".color(:red).bright + msg
end
def warn msg
show " ! ".color(:yellow).bright + msg
end
def ok msg
show "".color(:green).bright + msg
end
end
end