Module: Beanstalker::Extensions::ClassMethods

Defined in:
lib/beanstalker/extend.rb

Instance Method Summary collapse

Instance Method Details

#async_class_method(method, options = {}) ⇒ Object



45
46
47
48
49
50
# File 'lib/beanstalker/extend.rb', line 45

def async_class_method(method, options = {})
  @class_methods_async_options ||= {}
  if options
    @class_methods_async_options.merge!(method.to_sym => options)
  end
end

#async_error_handlerObject



56
57
58
# File 'lib/beanstalker/extend.rb', line 56

def async_error_handler
  @async_rescue
end

#async_method(method, options = {}) ⇒ Object



38
39
40
41
42
43
# File 'lib/beanstalker/extend.rb', line 38

def async_method(method, options = {})
  @methods_async_options ||= {}
  if options
    @methods_async_options.merge!(method.to_sym => options)
  end
end

#async_rescue(&block) ⇒ Object



52
53
54
# File 'lib/beanstalker/extend.rb', line 52

def async_rescue(&block)
  @async_rescue = block
end