Skip to content

Instantly share code, notes, and snippets.

@ColinCampbell
Created May 29, 2010 22:36
Show Gist options
  • Save ColinCampbell/418598 to your computer and use it in GitHub Desktop.
Save ColinCampbell/418598 to your computer and use it in GitHub Desktop.
extend: function(ext) {
var ret = SC.mixin(SC.beget(this), ext),
key, value, cur;
for(key in ret) {
value = ret[key];
if (value instanceof Function && !value.superclass && (value !== (cur=this[key]))) {
value.superclass = value.base = cur;
}
}
return ret;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment