Class: ResqueSerial::Extender::SyncProxy

Inherits:
Object
  • Object
show all
Defined in:
lib/resque-serial/extender.rb

Instance Method Summary collapse

Constructor Details

#initialize(target, queue, async) ⇒ SyncProxy



4
5
6
7
8
# File 'lib/resque-serial/extender.rb', line 4

def initialize(target, queue, async)
  @queue = queue
  @target = target
  @async = async
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(*args) ⇒ Object



10
11
12
13
14
15
16
# File 'lib/resque-serial/extender.rb', line 10

def method_missing(*args)
  if @async
    AsyncJob.create @target, @queue, *args
  else
    SyncJob.create @target, @queue, *args
  end
end