Module: RockQueue::ActiveRecordHelper::ClassMethods

Defined in:
lib/rock-queue/active_record_helper.rb

Instance Method Summary collapse

Instance Method Details

#perform(*args) ⇒ Object



11
12
13
14
15
16
# File 'lib/rock-queue/active_record_helper.rb', line 11

def perform(*args)
  args = args.first
  id = args.shift
  method = args.shift
  find(id).send(method, *args)
end

#queueObject



18
19
20
# File 'lib/rock-queue/active_record_helper.rb', line 18

def queue
  const_defined?(:QUEUE) ? self::QUEUE : :default
end