Class: MultiScheduler::Scheduler

Inherits:
Object
  • Object
show all
Defined in:
lib/multi_scheduler.rb

Direct Known Subclasses

Launchd, Whenever

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Scheduler

Returns a new instance of Scheduler.



25
26
27
28
29
30
31
32
33
# File 'lib/multi_scheduler.rb', line 25

def initialize options = {}

  @identifier = options[:id]
  raise ":id is required" unless @identifier

  @command_arguments = options[:args] || []
  @command = options[:command] || @command_arguments.shift
  raise ":command is required" unless @command
end