Class: BackgroundProxy::Proxy

Inherits:
Object
  • Object
show all
Defined in:
lib/background_proxy/proxy.rb

Instance Method Summary collapse

Constructor Details

#initialize(client, options = {}) ⇒ Proxy

Returns a new instance of Proxy.



4
5
6
7
# File 'lib/background_proxy/proxy.rb', line 4

def initialize(client, options = {})
  @client = client
  @options = options
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args) ⇒ Object (private)



19
20
21
22
23
24
25
# File 'lib/background_proxy/proxy.rb', line 19

def method_missing(method, *args)
  if client.respond_to?(method)
    worker.async(method, *args)
  else
    super
  end
end