mirror of
https://github.com/HeyPuter/puter.git
synced 2026-09-13 16:56:14 +00:00
24 lines
498 B
JavaScript
24 lines
498 B
JavaScript
const { BasicBase } = require("./BasicBase");
|
|
|
|
class TraitBase extends BasicBase {
|
|
constructor (parameters, ...a) {
|
|
super(parameters, ...a);
|
|
for ( const trait of this.traits ) {
|
|
trait.install_in_instance(
|
|
this,
|
|
{
|
|
parameters: parameters || {},
|
|
}
|
|
)
|
|
}
|
|
}
|
|
|
|
get traits () {
|
|
return this._get_merged_static_array('TRAITS');
|
|
}
|
|
}
|
|
|
|
module.exports = {
|
|
TraitBase,
|
|
};
|