module WdiTf::Funcs
Public Instance Methods
error(msg:, code: 1)
click to toggle source
# File lib/wdi_tf/funcs.rb, line 20 def error(msg:, code: 1) puts "\033[31mERROR: #{ msg }\033[0m" exit(code) end
info(msg)
click to toggle source
# File lib/wdi_tf/funcs.rb, line 25 def info(msg) color = (/^\s+/.match(msg)) ? 32 : 34 puts "\033[1;30m[#{ Time.now.strftime("%Y.%m.%d %H:%M:%S") }] \033[#{ color }m#{ msg }\033[0m" end
set_verbose=(v)
click to toggle source
# File lib/wdi_tf/funcs.rb, line 6 def set_verbose=(v) @verbose = v end
verbose(msg)
click to toggle source
# File lib/wdi_tf/funcs.rb, line 14 def verbose(msg) if WdiTf::Funcs.verbose? info(msg) end end
verbose?()
click to toggle source
# File lib/wdi_tf/funcs.rb, line 10 def verbose? @verbose end