Class: Backgrounded::Handler::WorklingHandler::BackgroundedWorker

Inherits:
Workling::Base
  • Object
show all
Defined in:
lib/backgrounded/handler/workling_handler.rb

Instance Method Summary collapse

Instance Method Details

#perform(options = {}) ⇒ Object



23
24
25
26
27
28
29
30
# File 'lib/backgrounded/handler/workling_handler.rb', line 23

def perform(options = {})
  clazz = options[:class].constantize
  if options[:class_method]
    clazz.send(options[:method], *options[:params])
  else
    clazz.find(options[:id]).send(options[:method], *options[:params])
  end
end