Class: ProcessWanker::Configuration

Inherits:
ConfigNode show all
Defined in:
lib/config/config.rb

Overview

Configuration - the root configuration object

client - the client configuration section daemon - the daemon configuration section

Instance Attribute Summary collapse

Attributes inherited from ConfigNode

#container

Instance Method Summary collapse

Methods inherited from ConfigNode

#find_attributes, #get_auth

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



38
39
40
41
# File 'lib/config/config.rb', line 38

def initialize()
	@client=nil
	@daemon=nil
end

Instance Attribute Details

#authObject

Returns the value of attribute auth.



30
31
32
# File 'lib/config/config.rb', line 30

def auth
  @auth
end

#clientObject

Returns the value of attribute client.



28
29
30
# File 'lib/config/config.rb', line 28

def client
  @client
end

#daemonObject

Returns the value of attribute daemon.



29
30
31
# File 'lib/config/config.rb', line 29

def daemon
  @daemon
end

Instance Method Details

#add_defaultsObject



43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# File 'lib/config/config.rb', line 43

def add_defaults()
	
	# ensure there's a default auth block
	if(!@auth)
		@auth = ConfigAuth.new()
		@auth.container=self
	end
	
	# ensure there's a default client config
	if(!@client)
		@client = ConfigClient.new
		@client.container=self
	end
	
end