Module: Resque::Failure::Thoughtbot::ClassMethods

Defined in:
lib/resque/failure/thoughtbot.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#klassObject

Returns the value of attribute klass.



9
10
11
# File 'lib/resque/failure/thoughtbot.rb', line 9

def klass
  @klass
end

Instance Method Details

#configure(&block) ⇒ Object



11
12
13
14
# File 'lib/resque/failure/thoughtbot.rb', line 11

def configure(&block)
  Resque::Failure.backend = self
  klass.configure(&block)
end

#count(queue = nil, class_name = nil) ⇒ Object



16
17
18
19
20
# File 'lib/resque/failure/thoughtbot.rb', line 16

def count(queue = nil, class_name = nil)
  # We can't get the total # of errors from Hoptoad so we fake it
  # by asking Resque how many errors it has seen.
  Stat[:failed]
end