module Rufus::Scheduler::Schedulable

It's OK to pass an object responding to :trigger when scheduling a job (instead of passing a block).

This is simply a helper module. The rufus-scheduler will check if scheduled object quack (respond to :trigger anyway).

Public Instance Methods

call(job) click to toggle source
# File lib/rufus/sc/scheduler.rb, line 46
def call (job)
  trigger(job.params)
end
trigger(params) click to toggle source
# File lib/rufus/sc/scheduler.rb, line 49
def trigger (params)
  raise NotImplementedError.new('implementation is missing')
end