class Denouncer::Notifiers::ConsoleNotifier

Public Instance Methods

info(info_message, metadata = nil) click to toggle source

Sends a info notification.

@param info_message [String] @param metadata [Hash]

# File lib/denouncer/notifiers/console_notifier.rb, line 25
def info(info_message, metadata = nil)
  puts "Timestamp: #{get_current_timestamp.to_s}"
  puts "INFO: #{info_message.to_s}"
  puts "Metadata: #{metadata.to_s}"
end
name() click to toggle source

@return [String]

# File lib/denouncer/notifiers/console_notifier.rb, line 6
def name
  'console'
end
notify(error, metadata = nil) click to toggle source
# File lib/denouncer/notifiers/console_notifier.rb, line 14
def notify(error, metadata = nil)
  puts "Timestamp: #{get_current_timestamp.to_s}"
  puts "Error Class: #{error.class.name}"
  puts "Error Message: #{error.message}"
  puts "Metadata: #{metadata.to_s}"
end
set_configuration!(options) click to toggle source
# File lib/denouncer/notifiers/console_notifier.rb, line 10
def set_configuration!(options)
  return options
end