allex_destroyablemixinslowlevellib
Version:
JavaScript Destroyable mixins
16 lines (12 loc) • 387 B
JavaScript
module.exports = function (inheritMethods, dummyFunc) {
'use strict';
function SimpleDestroyable () {}
SimpleDestroyable.prototype.destroy = function () {
this.__cleanUp();
};
SimpleDestroyable.prototype.__cleanUp = dummyFunc;
SimpleDestroyable.addMethods = function (chld) {
inheritMethods(chld, SimpleDestroyable, 'destroy');
};
return SimpleDestroyable;
};