mirror of
https://github.com/inspec/inspec
synced 2024-11-15 17:28:02 +00:00
e9d642fc61
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
26 lines
No EOL
468 B
Ruby
26 lines
No EOL
468 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 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 |