Class: ExceptionNotifier::GoogleChatNotifier
- Inherits:
-
BaseNotifier
- Object
- BaseNotifier
- ExceptionNotifier::GoogleChatNotifier
- Defined in:
- lib/exception_notifier/google_chat_notifier.rb
Instance Attribute Summary
Attributes inherited from BaseNotifier
Instance Method Summary collapse
Methods inherited from BaseNotifier
#_post_callback, #_pre_callback, #initialize, #send_notice
Constructor Details
This class inherits a constructor from ExceptionNotifier::BaseNotifier
Instance Method Details
#call(exception, opts = {}) ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/exception_notifier/google_chat_notifier.rb', line 7 def call(exception, opts = {}) = .merge(opts) formatter = Formatter.new(exception, ) HTTParty.post( [:webhook_url], body: {text: body(exception, formatter)}.to_json, headers: {"Content-Type" => "application/json"} ) end |