class Taeval::Output
Public Class Methods
new(conf_h)
click to toggle source
# File lib/taeval/output.rb, line 4 def initialize(conf_h) @verbose = conf_h.fetch('verbose', false) end
Public Instance Methods
print(header, stdout = '', stderr = '')
click to toggle source
# File lib/taeval/output.rb, line 8 def print(header, stdout = '', stderr = '') if @verbose puts "\e[95m#{header}\e[0m" puts "\e[97m#{stdout}\e[0m" if !stdout.nil? && !stdout.empty? puts "\e[91m#{stderr}\e[0m" if !stderr.nil? && !stderr.empty? end end