class M2Config::Server
Constants
- ACCESS_LOG
- BIND_ADDR
- CHROOT
- CONTROL_PORT
- DEFAULT_HOST
- ERROR_LOG
- NAME
- PID_FILE
- PORT
- USE_SSL
Public Class Methods
first()
click to toggle source
Calls superclass method
# File lib/m2config/server.rb, line 32 def self.first raise "Careful ! You are calling Server.first on a database holding multiple servers" if ((Server.get {count(id)}) > 1) super end
new( fields={} )
click to toggle source
Calls superclass method
# File lib/m2config/server.rb, line 16 def initialize( fields={} ) fields[:uuid] ||= UUID.new.generate fields[:access_log] ||= M2Config::Server::ACCESS_LOG fields[:error_log] ||= ERROR_LOG fields[:pid_file] ||= PID_FILE fields[:chroot] ||= CHROOT fields[:default_host] ||= DEFAULT_HOST fields[:name] ||= NAME fields[:bind_addr] ||= BIND_ADDR fields[:port] ||= PORT fields[:use_ssl] ||= USE_SSL fields[:control_port] ||= CONTROL_PORT super fields, false save end