class ResqueAsync::Enqueuers::ActiveRecordEnqueuer
Public Class Methods
find_and_send(class_name, id, method_name, args)
click to toggle source
# File lib/resque-async/enqueuers.rb, line 47 def self.find_and_send(class_name, id, method_name, args) record = class_name.constantize.find(id) if args.empty? record.send(method_name) else record.send(method_name, *args) end end
new(host_class, priority, id)
click to toggle source
Calls superclass method
ResqueAsync::Enqueuers::ClassEnqueuer::new
# File lib/resque-async/enqueuers.rb, line 37 def initialize(host_class, priority, id) super(host_class, priority) @id = id end
Public Instance Methods
method_missing(methId, *args)
click to toggle source
Calls superclass method
ResqueAsync::Enqueuers::ClassEnqueuer#method_missing
# File lib/resque-async/enqueuers.rb, line 42 def method_missing(methId, *args) return super(methId, args) unless @host_class.method_defined?(methId) self.class::async(@priority).find_and_send(@host_class.name, @id, methId.id2name, args) end