bricks-cli
Version:
Command line tool for developing ambitious ember.js apps
31 lines (22 loc) • 629 B
JavaScript
;
var assign = require('lodash-node/modern/objects/assign');
// TODO: bring with from IoC container module
function CoreObject(options) {
assign(this, options);
}
module.exports = CoreObject;
CoreObject.prototype.constructor = CoreObject;
CoreObject.extend = function(options) {
var constructor = this;
function Class() {
constructor.apply(this, arguments);
if (this.init) {
this.init(options);
}
}
Class.__proto__ = CoreObject;
Class.prototype = Object.create(constructor.prototype);
assign(Class.prototype, options);
Class.prototype.constructor = Class;
return Class;
};