Created
January 14, 2010 03:31
-
-
Save CrypticSwarm/276824 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
this.Class = function(params){ | |
if (params instanceof Function) params = {initialize: params}; | |
var newClass = function(){ | |
this.Object.reset(this); | |
if (newClass._prototyping) return this; | |
this._current = $empty; | |
var value = (this.initialize) ? this.initialize.apply(this, arguments) : this; | |
delete this._current; delete this.caller; | |
return value; | |
}.extend(this); | |
newClass.implement(params); | |
newClass.constructor = Class; | |
newClass.prototype.constructor = newClass; | |
return newClass; | |
}; | |
/* | |
... | |
*/ | |
}).apply(require('Mootools').getMootools()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require('mootoolsContext').setMootools(GLOBAL); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var mootoolsObj = window || exports; | |
if(typeof require == 'undefined') mootoolsObj.require = function() { return mootoolsObj; }; | |
mootoolsObj.getMootools = function() { | |
return mootoolsObj; | |
}; | |
mootoolsObj.setMootools = function(moo) { | |
mootoolsObj = moo; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment