Class: N::Conf

Inherits:
Flexob show all
Defined in:
lib/nitro/conf.rb

Overview

Configuration.

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Conf

Returns a new instance of Conf.



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/nitro/conf.rb', line 13

def initialize(options)
	unless options.is_a?(Hash)
		raise ArgumentError.new('An options hash is required!')
	end

	# Default configuration parameters.

	hash = {
		:name => 'Nitro Application',
		:host => 'localhost',
		:port => 8069,
		:dispatcher => Dispatcher.new
	}
	
	hash.update(options)

	super(hash)
end