Method: Queued::QueueingProxy#method_missing

Defined in:
lib/queued/queueing_proxy.rb

#method_missing(method, *args) ⇒ Object



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/queued/queueing_proxy.rb', line 13

def method_missing(method, *args)
  unless target.respond_to?(method)
    raise NoMethodError.new \
      "`#{method}' can't be invoked on #{target.class.name}",
      method,
      *args
  end

  Resque::Job.create(queue_name,
    target.class,
    target.id,
    method.to_sym,
    *args)

  nil
end