Class: Snipr::Output

Inherits:
Object
  • Object
show all
Defined in:
lib/snipr/output.rb

Overview

Class for writing to standard error & standard out in a uniform way.

Instance Method Summary collapse

Instance Method Details

#err(msg) ⇒ Object

Write a message prepndend with an ISO8601 timestamp to STDERR



18
19
20
# File 'lib/snipr/output.rb', line 18

def err(msg)
  STDERR.write("#{runtime} #{msg}\n")
end

#info(msg) ⇒ Object

Write a message prepended with an ISO8601 timestamp to STDOUT



11
12
13
# File 'lib/snipr/output.rb', line 11

def info(msg)
  STDOUT.write("#{runtime} #{msg}\n")
end