Class Config
In: util/config.rb
Parent: Object

Class interface to config data.

Methods
backend    db    get    init    named    new    start   
Included modules
Singleton
Public Class methods
new()

No constructor.

# File util/config.rb, line 70
  def initialize()
    Config.init()
  end
init()

Class method to read configuration file.

# File util/config.rb, line 75
  def self.init()
    begin
      Kernel.load CONFFILE
    rescue Exception => e
      STDERR.puts("Error loading \"#{CONFFILE}\":\n#{e.message}")
      exit(1)
    end
  end
Public Instance methods
start()

Return hash of programs to start, keyed by hostname.

# File util/config.rb, line 84
  def start()
    get(:START)
  end
db()

Return hash of database parameters.

# File util/config.rb, line 88
  def db()
    get(:DB)
  end
backend()

Return hash of backend programs and their configuration data.

# File util/config.rb, line 92
  def backend()
    get(:BACKEND)
  end
named()

Return hash of location and port to contact server daemon.

# File util/config.rb, line 96
  def named()
    get(:NAMED)
  end
Private Instance methods
get(name)

Retrieve configuration item by symbol.

# File util/config.rb, line 103
  def get(name)
    JukeboxConf.const_defined?(name) ? JukeboxConf.const_get(name) : nil
  end