Class: Skiplock::Extension::ProxyJob

Inherits:
ActiveJob::Base
  • Object
show all
Defined in:
lib/skiplock/extension.rb

Instance Method Summary collapse

Instance Method Details

#perform(yml) ⇒ Object

Raises:



17
18
19
20
21
# File 'lib/skiplock/extension.rb', line 17

def perform(yml)
  target, method_name, args = ::YAML.load(yml) rescue nil
  raise ProxyError, "Skiplock extension is not allowed for:\n#{yml}" unless target.respond_to?(:skiplock)
  target.__send__(method_name, *args)
end