Method: FireAndForget::Launcher#method_missing

Defined in:
lib/fire_and_forget/launcher.rb

#method_missing(method, *args, &block) ⇒ Object (protected)

Catch method missing to enable launching of tasks by direct name e.g.

FireAndForget.add_task(:process_things, "/usr/bin/process")

launch this task:

FireAndForget.process_things


122
123
124
125
126
127
128
# File 'lib/fire_and_forget/launcher.rb', line 122

def method_missing(method, *args, &block)
  if tasks.key?(method)
    fire(method, *args, &block)
  else
    super
  end
end