Module: Rufus::Scheduler::Schedulable

Included in:
Rufus::Schedulable
Defined in:
lib/rufus/sc/scheduler.rb

Overview

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).

Instance Method Summary collapse

Instance Method Details

#call(job) ⇒ Object



43
44
45
# File 'lib/rufus/sc/scheduler.rb', line 43

def call (job)
  trigger(job.params)
end

#trigger(params) ⇒ Object

Raises:

  • (NotImplementedError)


46
47
48
# File 'lib/rufus/sc/scheduler.rb', line 46

def trigger (params)
  raise NotImplementedError.new('implementation is missing')
end