Class: Crono::Cronotab

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

Class Method Summary collapse

Class Method Details

.process(cronotab_path = nil) ⇒ Object



3
4
5
6
7
8
# File 'lib/crono/cronotab.rb', line 3

def self.process(cronotab_path = nil)
  cronotab_path ||= ENV['CRONOTAB'] || (defined?(Rails) &&
                    File.join(Rails.root, Config::CRONOTAB))
  fail 'No cronotab defined' unless cronotab_path
  require cronotab_path
end