Method: Aservice::ClassMethods#method_missing

Defined in:
lib/aservice.rb

#method_missing(method, *args) ⇒ Object



35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/aservice.rb', line 35

def method_missing(method, *args)
  method = method.to_s
  if method =~ /_async$/
    method = method.sub(/.*\K_async/, '')
    perform(:async, method, args)
  elsif method =~ /_after$/
    method = method.sub(/.*\K_after/, '')
    perform(:after, method, args)
  else
    raise_no_method_error("No method: #{method} for class: #{AserviceWorker.name}")
  end
end