lib/module.js
function(nm, modules, snooze) {
		this.snooze = snooze;

		if(nm === null || nm === undefined || nm.length < 1) {
			throw new Error('Module name note defined.');
		}

		this.name = nm;
		this.snoozeConfig = this.snooze.getConfig();
		this.runs = [];
		this.configs = [];
		this.modules = modules || [];
		this.EntityManager = new EntityManager(this, snooze);
		this.importedModules = {};
		this.importProcesses = [];
		this.configPreprocessors = [];

		// TODO: move this to a better location
		var self = this;
		this.EntityManager.defineReservedInjectable('$config', function() {
			return self.getConfig();
		});

		this.EntityManager.defineReservedInjectable('$entityManager', function() {
			return self.EntityManager;
		});
	}
function(nm, modules, snooze) {
		this.snooze = snooze;

		if(nm === null || nm === undefined || nm.length < 1) {
			throw new Error('Module name note defined.');
		}

		this.name = nm;
		this.snoozeConfig = this.snooze.getConfig();
		this.runs = [];
		this.configs = [];
		this.modules = modules || [];
		this.EntityManager = new EntityManager(this, snooze);
		this.importedModules = {};
		this.importProcesses = [];
		this.configPreprocessors = [];

		// TODO: move this to a better location
		var self = this;
		this.EntityManager.defineReservedInjectable('$config', function() {
			return self.getConfig();
		});

		this.EntityManager.defineReservedInjectable('$entityManager', function() {
			return self.EntityManager;
		});
	}
function ( nm , modules , snooze ) { this . snooze = snooze ; if ( nm === null || nm === undefined || nm . length < 1 ) { throw new Error ( 'Module name note defined.' ) ; } this . name = nm ; this . snoozeConfig = this . snooze . getConfig ( ) ; this . runs = [ ] ; this . configs = [ ] ; this . modules = modules || [ ] ; this . EntityManager = new EntityManager ( this , snooze ) ; this . importedModules = { } ; this . importProcesses = [ ] ; this . configPreprocessors = [ ] ; // TODO: move this to a better location var self = this ; this . EntityManager . defineReservedInjectable ( '$config' , function ( ) { return self . getConfig ( ) ; } ) ; this . EntityManager . defineReservedInjectable ( '$entityManager' , function ( ) { return self . EntityManager ; } ) ; }
A SnoozeJS Module
@constructor
@param {string} nm - The name of the module
@param {array} modules - Array of module names to inject
A SnoozeJS Module