Skip to content

Instantly share code, notes, and snippets.

@CrypticSwarm
Created January 14, 2010 03:31
Show Gist options
  • Save CrypticSwarm/276824 to your computer and use it in GitHub Desktop.
Save CrypticSwarm/276824 to your computer and use it in GitHub Desktop.
(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());
require('mootoolsContext').setMootools(GLOBAL);
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