Class: Crono::Config

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

Overview

Crono::Config stores Crono configuration

Constant Summary collapse

CRONOTAB =
'config/cronotab.rb'
LOGFILE =
'log/crono.log'
PIDFILE =
'tmp/pids/crono.pid'
PIDDIR =
'tmp/pids'
PROCESS_NAME =
'crono'

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



13
14
15
16
17
18
19
20
21
22
# File 'lib/crono/config.rb', line 13

def initialize
  self.cronotab = CRONOTAB
  self.logfile  = LOGFILE
  self.piddir = PIDDIR
  self.process_name = PROCESS_NAME
  self.daemonize = false
  self.deprecated_daemonize = false
  self.monitor = false
  self.environment = ENV['RAILS_ENV'] || ENV['RACK_ENV'] || 'development'
end

Instance Attribute Details

#cronotabObject

Returns the value of attribute cronotab.



10
11
12
# File 'lib/crono/config.rb', line 10

def cronotab
  @cronotab
end

#daemonizeObject

Returns the value of attribute daemonize.



10
11
12
# File 'lib/crono/config.rb', line 10

def daemonize
  @daemonize
end

#deprecated_daemonizeObject

Returns the value of attribute deprecated_daemonize.



10
11
12
# File 'lib/crono/config.rb', line 10

def deprecated_daemonize
  @deprecated_daemonize
end

#environmentObject

Returns the value of attribute environment.



10
11
12
# File 'lib/crono/config.rb', line 10

def environment
  @environment
end

#logfileObject

Returns the value of attribute logfile.



10
11
12
# File 'lib/crono/config.rb', line 10

def logfile
  @logfile
end

#monitorObject

Returns the value of attribute monitor.



10
11
12
# File 'lib/crono/config.rb', line 10

def monitor
  @monitor
end

#piddirObject

Returns the value of attribute piddir.



10
11
12
# File 'lib/crono/config.rb', line 10

def piddir
  @piddir
end

#pidfileObject

Returns the value of attribute pidfile.



10
11
12
# File 'lib/crono/config.rb', line 10

def pidfile
  @pidfile
end

#process_nameObject

Returns the value of attribute process_name.



10
11
12
# File 'lib/crono/config.rb', line 10

def process_name
  @process_name
end