Sha256: a56a9be21ea49331c768121aa3449aa91e16ecf12c080c0f187b0252b10864e2

Contents?: true

Size: 669 Bytes

Versions: 1

Compression:

Stored size: 669 Bytes

Contents

require 'glue/flexob'

require 'nitro/dispatcher'

module Nitro
	
# Configuration.

class Conf < Flexob

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

		# Default configuration parameters.

		hash = {
			:name => 'Nitro',
			:host => '0.0.0.0', # this is accessible as localhost on windows.
			:port => 9999,
			:dispatcher => Dispatcher.new,
			:template_root => 'templates',
			:public_root => 'public'
		}
		
		hash.update(options)

		super(hash)
	end

	def mount(name, options = {})
		$nitro_mount_options = options
		require_part(name)
	end
	
end

end

# * George Moschovitis <gm@navel.gr>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
nitro-0.19.0 lib/nitro/conf.rb