Class: ErrorappNotifier::Notifier
- Inherits:
-
Object
- Object
- ErrorappNotifier::Notifier
- Defined in:
- lib/errorapp_notifier/notifier.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(data, uniq_key = nil) ⇒ Notifier
constructor
A new instance of Notifier.
- #notify_error ⇒ Object
Constructor Details
#initialize(data, uniq_key = nil) ⇒ Notifier
Returns a new instance of Notifier.
6 7 8 9 |
# File 'lib/errorapp_notifier/notifier.rb', line 6 def initialize(data, uniq_key = nil) @uniq_key = uniq_key @data = data end |
Class Method Details
.notify_error(exception_data) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/errorapp_notifier/notifier.rb', line 11 def self.notify_error(exception_data) new( exception_data.to_json, exception_data.uniq_key ).notify_error end |
Instance Method Details
#notify_error ⇒ Object
18 19 20 21 22 |
# File 'lib/errorapp_notifier/notifier.rb', line 18 def notify_error log_and_send do client.post(url, data) end end |