class JobDispatch::Client::Proxy
Attributes
options[R]
Public Class Methods
new(client, target, options={})
click to toggle source
# File lib/job_dispatch/client/proxy.rb, line 12 def initialize(client, target, options={}) @client = client @target = case target when Class target.to_s when String target else raise NotImplementedError, "Don't yet know how to serialize an object instance as a target" end @options = options end
Public Instance Methods
method_missing(method, *args)
click to toggle source
# File lib/job_dispatch/client/proxy.rb, line 25 def method_missing(method, *args) @client.enqueue(queue: queue, target: @target, method: method.to_s, parameters: args) end
queue()
click to toggle source
# File lib/job_dispatch/client/proxy.rb, line 29 def queue @options[:queue] || :default end