Class: Denouncer::Notifiers::ConsoleNotifier

Inherits:
BaseNotifier show all
Defined in:
lib/denouncer/notifiers/console_notifier.rb

Instance Attribute Summary

Attributes inherited from BaseNotifier

#config

Instance Method Summary collapse

Methods inherited from BaseNotifier

#get_current_timestamp, #get_error_cause, #initialize

Constructor Details

This class inherits a constructor from Denouncer::Notifiers::BaseNotifier

Instance Method Details

#nameString

Returns:

  • (String)


6
7
8
# File 'lib/denouncer/notifiers/console_notifier.rb', line 6

def name
  'console'
end

#notify(error, metadata = nil) ⇒ Object



14
15
16
17
18
19
# File 'lib/denouncer/notifiers/console_notifier.rb', line 14

def notify(error,  = nil)
  puts "Timestamp: #{get_current_timestamp.to_s}"
  puts "Error Class: #{error.class.name}"
  puts "Error Message: #{error.message}"
  puts "Metadata: #{.to_s}"
end

#set_configuration!(options) ⇒ Object



10
11
12
# File 'lib/denouncer/notifiers/console_notifier.rb', line 10

def set_configuration!(options)
  return options
end