-
-
Save StanAngeloff/544187 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
var Account, Model; | |
var __extends = function(child, parent) { | |
var ctor = function(){}; | |
ctor.prototype = parent.prototype; | |
child.prototype = new ctor(); | |
child.prototype.constructor = child; | |
if (typeof parent.extended === "function") parent.extended(child); | |
child.__superClass__ = parent.prototype; | |
}; | |
Model = function() {}; | |
(function() { | |
this.has_many = function(names) { | |
return (this[names] = function() {}); | |
}; | |
}).call(Model.prototype); | |
Account = function() { | |
return Model.apply(this, arguments); | |
}; | |
__extends(Account, Model); | |
(function() { | |
this.has_many('emails'); | |
}).call(Account.prototype); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment