Class: Collective::Utilities::AirbrakeObserver

Inherits:
ObserverBase
  • Object
show all
Defined in:
lib/collective/utilities/airbrake_observer.rb

Instance Attribute Summary collapse

Attributes inherited from ObserverBase

#subject

Instance Method Summary collapse

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

#itObject (readonly)

job



14
15
16
# File 'lib/collective/utilities/airbrake_observer.rb', line 14

def it
  @it
end

#meObject (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