Class: Collective::Utilities::AirbrakeObserver
- Inherits:
-
ObserverBase
- Object
- ObserverBase
- Collective::Utilities::AirbrakeObserver
- Defined in:
- lib/collective/utilities/airbrake_observer.rb
Instance Attribute Summary collapse
-
#it ⇒ Object
readonly
job.
-
#me ⇒ Object
readonly
worker.
Attributes inherited from ObserverBase
Instance Method Summary collapse
-
#initialize(observed, callable = nil, &callable_block) ⇒ AirbrakeObserver
constructor
A new instance of AirbrakeObserver.
- #job_error(x) ⇒ Object
Methods inherited from ObserverBase
camelize, #focus, #notify, resolve
Constructor Details
#initialize(observed, callable = nil, &callable_block) ⇒ AirbrakeObserver
Returns a new instance of AirbrakeObserver.
17 18 19 20 |
# File 'lib/collective/utilities/airbrake_observer.rb', line 17 def initialize( observed, callable = nil, &callable_block ) @it = callable || callable_block @me = observed end |
Instance Attribute Details
#it ⇒ Object (readonly)
job
14 15 16 |
# File 'lib/collective/utilities/airbrake_observer.rb', line 14 def it @it end |
#me ⇒ Object (readonly)
worker
15 16 17 |
# File 'lib/collective/utilities/airbrake_observer.rb', line 15 def me @me end |
Instance Method Details
#job_error(x) ⇒ Object
22 23 24 |
# File 'lib/collective/utilities/airbrake_observer.rb', line 22 def job_error(x) Airbrake.notify(x) end |