diamond.js
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -10,12 +10,9 @@ // Generated by CoffeeScript 1.7.1 | ||
Controller.controllers = {}; | ||
function Controller() { | ||
return Controller.__super__.constructor.apply(this, arguments); | ||
this.name = this.constructor.name.split('Controller')[0].toLowerCase(); | ||
Controller.controllers[this.name] = this.constructor; | ||
} | ||
Controller.controllers = {}; | ||
Controller.resource = function(name) { | ||
return this.controllers[name] = this; | ||
}; | ||
return Controller; | ||
@@ -22,0 +19,0 @@ |
@@ -10,3 +10,2 @@ // Generated by CoffeeScript 1.7.1 | ||
this.server = server; | ||
this.controllers = Controller.controllers; | ||
if (callback != null) { | ||
@@ -59,3 +58,3 @@ callback.call(this); | ||
return { | ||
controller: this.controllers[controller].getInstance(), | ||
controller: Controller.controllers[controller].getInstance(), | ||
action: action | ||
@@ -62,0 +61,0 @@ }; |
{ | ||
"name": "diamond.js", | ||
"description": "MVC web framework", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "Arthur Xavier", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
21752
25
442