Created
January 14, 2014 17:54
-
-
Save stolksdorf/8422636 to your computer and use it in GitHub Desktop.
Just a test Gist
This file contains 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 is simply a test | |
== HOW DU | |
Archetype = archetype ={ | |
initialize : function(){ | |
return this; | |
}, | |
create : function(){ | |
var obj = this.extend(); | |
obj.deep('initialize').apply(obj, arguments); | |
obj.trigger('created', obj); //remove? test with presto | |
return obj; | |
}, | |
extend : function(methods){ | |
var obj = Object.create(this); | |
obj.events = obj._events.bind({storedEvents : []}); | |
return obj.mixin(methods); | |
}, | |
mixin : function(methods){ | |
for(var methodName in methods){ | |
this[methodName] = methods[methodName]; | |
} | |
return this; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment