Class: Isolator::Notifier
- Inherits:
-
Object
- Object
- Isolator::Notifier
- Defined in:
- lib/isolator/notifier.rb
Overview
Wrapper over different notifications methods (exceptions, logging, uniform notifier)
Instance Attribute Summary collapse
-
#backtrace ⇒ Object
readonly
Returns the value of attribute backtrace.
-
#exception ⇒ Object
readonly
Returns the value of attribute exception.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(exception, backtrace = caller) ⇒ Notifier
constructor
A new instance of Notifier.
Constructor Details
#initialize(exception, backtrace = caller) ⇒ Notifier
8 9 10 11 |
# File 'lib/isolator/notifier.rb', line 8 def initialize(exception, backtrace = caller) @exception = exception @backtrace = backtrace end |
Instance Attribute Details
#backtrace ⇒ Object (readonly)
Returns the value of attribute backtrace.
6 7 8 |
# File 'lib/isolator/notifier.rb', line 6 def backtrace @backtrace end |
#exception ⇒ Object (readonly)
Returns the value of attribute exception.
6 7 8 |
# File 'lib/isolator/notifier.rb', line 6 def exception @exception end |
Instance Method Details
#call ⇒ Object
13 14 15 16 17 |
# File 'lib/isolator/notifier.rb', line 13 def call log_exception send_notifications if send_notifications? raise(exception.class, exception., filtered_backtrace) if raise_exceptions? end |