Class: JunkDrawer::Notifier::HoneybadgerStrategy

Inherits:
Object
  • Object
show all
Includes:
Callable
Defined in:
lib/junk_drawer/notifier/honeybadger_strategy.rb

Overview

Notifier strategy to send a notification to Honeybadger

Instance Method Summary collapse

Methods included from Callable

included, #to_proc

Instance Method Details

#call(message, **context) ⇒ Object



11
12
13
14
# File 'lib/junk_drawer/notifier/honeybadger_strategy.rb', line 11

def call(message, **context)
  error = message.is_a?(Exception) ? message : NotifierError.new(message)
  Honeybadger.notify(error, context: context)
end