Sha256: e4181541cf8fea78642eb14efc6c20d1b6f39fc7d346e1710fdaed5b1c36e99c
Contents?: true
Size: 998 Bytes
Versions: 14
Compression:
Stored size: 998 Bytes
Contents
Mod.Application = (function() { function Application(name) { if (is_undefined(name)) { throw new Error("new Mod.Application(name): name is undefined"); } this.name = name }; // add_module is a factory function to attach modules to the application object Application.prototype.add_module = function(name) { if (is_undefined(name)) { throw new Error("Mod.Application.add_module(name): name is undefined"); } if (is_defined(this[name])) { throw new Error("Mod.Application.add_module('" + name + "'): '" + name + "' already declared"); } if (this.name === name) { throw new Error("Mod.Application.add_module('" + name + "'): a module cannot have the same name as the application. It's bad idea. Do you really want to write " + name + "." + name + "? It's confusing.'"); } return this[name] = new Mod.Module(name); }; return Application; })();
Version data entries
14 entries across 14 versions & 1 rubygems