Class: Resque::Plugins::SendLater::DelayedPerformer

Inherits:
Object
  • Object
show all
Defined in:
lib/resque/plugins/send_later.rb

Class Method Summary collapse

Class Method Details

.perform(klass, object_id, method, *args) ⇒ Object



41
42
43
44
45
46
47
48
# File 'lib/resque/plugins/send_later.rb', line 41

def self.perform(klass, object_id, method, *args)
  if object_id.nil? # class method delay
    klass.constantize.send(method, *args)
  else
    model = klass.constantize.send(:find, object_id)
    model.send(method, *args)
  end
end