module WRKFLO::Notifier

Constants

Public Class Methods

error_out(*messages, type: "Error", status: 1) click to toggle source

Write an error message to stderr and abort execution, exiting with the given status code, or `1` if no status code is specified.

# File lib/wrkflo/notifier.rb, line 9
def self.error_out *messages, type: "Error", status: 1
  $stderr.puts "#{type}: #{messages.first}"
  messages.drop(1).each{ |msg| $stderr.puts "\t#{msg}" }
  $stderr.puts FOOTER_TEXT
  exit status
end
log(message) click to toggle source

Write an arbitrary message to stdout.

# File lib/wrkflo/notifier.rb, line 17
def self.log message
  $stdout.puts message
end