Sha256: 0dc35872ee9b1c4c6a62237c0b2092719c74e4cc52cce8666e299d06f9f26983

Contents?: true

Size: 529 Bytes

Versions: 10

Compression:

Stored size: 529 Bytes

Contents

NinjsApplication = function() {};

NinjsApplication.prototype.add_module = function(name) {
	if (is_undefined(name)) {
		throw new SyntaxError("NinjsApplication.add_module(name): name is undefined");
	}

	if (is_defined(this[name])) {
		throw new SyntaxError("NinjsApplication.add_module(name): '" + name + "' already declared");
	}

	if (this.name === name) {
		throw new SyntaxError("NinjsApplication.add_module(name): a module cannot have the same name as the application");
	}

	return this[name] = new NinjsModule(name);
};

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
ninjs-0.16.8 repository/ninjs/core/application.js
ninjs-0.16.7 repository/ninjs/core/application.js
ninjs-0.16.6 repository/ninjs/core/application.js
ninjs-0.16.5 repository/ninjs/core/application.js
ninjs-0.16.4 repository/ninjs/core/application.js
ninjs-framework-0.1.0 lib/ninjs-framework/core/application.js
ninjs-0.16.3 repository/ninjs/core/application.js
ninjs-0.16.2 repository/ninjs/core/application.js
ninjs-0.16.1 repository/ninjs/core/application.js
ninjs-0.16.0 repository/ninjs/core/application.js