Class: Softwear::Library::Enqueue::Worker

Inherits:
Object
  • Object
show all
Includes:
Sidekiq::Worker
Defined in:
lib/softwear/library/enqueue.rb

Instance Method Summary collapse

Instance Method Details

#perform(model_name, id, method, *args) ⇒ Object



11
12
13
14
15
16
# File 'lib/softwear/library/enqueue.rb', line 11

def perform(model_name, id, method, *args)
  record = model_name.constantize.find_by(id: id)
  if record
    record.send(method, *args)
  end
end