class Snipr::Output
Class for writing to standard error & standard out in a uniform way.
Public Instance Methods
err(msg)
click to toggle source
Write a message prepndend with an ISO8601 timestamp to STDERR
# File lib/snipr/output.rb, line 18 def err(msg) STDERR.write("#{runtime} #{msg}\n") end
info(msg)
click to toggle source
Write a message prepended with an ISO8601 timestamp to STDOUT
# File lib/snipr/output.rb, line 11 def info(msg) STDOUT.write("#{runtime} #{msg}\n") end
Private Instance Methods
runtime()
click to toggle source
# File lib/snipr/output.rb, line 23 def runtime Time.now.iso8601 end