module Eitil class SingleMethodJob < ApplicationJob queue_as :default def perform(_class:, _method:, id: nil) object = id ? _class.constantize.find(id) : _class.constantize object.send _method end end end