class Apolo::Notifiers::Console

Public Class Methods

new(options = {}) click to toggle source
# File lib/apolo/notifiers/console.rb, line 6
def initialize(options = {})
  @show_date = options[:show_date]
end

Public Instance Methods

notify(monitor, message, value) click to toggle source
# File lib/apolo/notifiers/console.rb, line 10
def notify(monitor, message, value)
  output = "#{monitor} #{message} #{value}"
  unless @show_date.nil?
    output = "#{DateTime.now} #{output}"
  end
  puts output
end