mirror of
https://github.com/plashchynski/crono.git
synced 2026-06-12 01:34:25 +02:00
Refactor to remove global variables
This commit is contained in:
@@ -1,23 +1,16 @@
|
||||
module Crono
|
||||
class Config
|
||||
include Singleton
|
||||
CRONOTAB = "config/cronotab.rb"
|
||||
LOGFILE = "log/crono.rb"
|
||||
|
||||
attr_accessor :schedule
|
||||
attr_accessor :cronotab
|
||||
attr_accessor :logfile
|
||||
attr_accessor :daemonize
|
||||
|
||||
def initialize
|
||||
self.schedule = Schedule.new
|
||||
self.cronotab = CRONOTAB
|
||||
self.logfile = LOGFILE
|
||||
self.daemonize = false
|
||||
end
|
||||
end
|
||||
|
||||
def self.config
|
||||
Config.instance
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user