Class: Skiplock::Extension::Proxy

Inherits:
BasicObject
Defined in:
lib/skiplock/extension.rb

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of Proxy.



4
5
6
7
# File 'lib/skiplock/extension.rb', line 4

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

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args) ⇒ Object



9
10
11
# File 'lib/skiplock/extension.rb', line 9

def method_missing(name, *args)
  ProxyJob.set(@options).perform_later(::YAML.dump([ @target, name, args ]))
end