Class: Collective::Utilities::HoptoadObserver
- Inherits:
-
ObserverBase
- Object
- ObserverBase
- Collective::Utilities::HoptoadObserver
- Defined in:
- lib/collective/utilities/hoptoad_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) ⇒ HoptoadObserver
constructor
A new instance of HoptoadObserver.
- #job_error(x) ⇒ Object
Methods inherited from ObserverBase
camelize, #focus, #notify, resolve
Constructor Details
#initialize(observed, callable = nil, &callable_block) ⇒ HoptoadObserver
Returns a new instance of HoptoadObserver.
17 18 19 20 |
# File 'lib/collective/utilities/hoptoad_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/hoptoad_observer.rb', line 14 def it @it end |
#me ⇒ Object (readonly)
worker
15 16 17 |
# File 'lib/collective/utilities/hoptoad_observer.rb', line 15 def me @me end |
Instance Method Details
#job_error(x) ⇒ Object
22 23 24 |
# File 'lib/collective/utilities/hoptoad_observer.rb', line 22 def job_error(x) HoptoadNotifier.notify(x) end |