cocktail
Version:
CocktailJS is a small library to explore traits, talents, inheritance and annotations concepts in nodejs - Shake your objects and classes with Cocktail!
29 lines (21 loc) • 529 B
JavaScript
/*
*
* Copyright (c) 2013 - 2016 Maximiliano Fierro
* Licensed under the MIT license.
*/
;
var Traits = require('./Traits');
function Talents () {
Traits.call(this);
}
Talents.prototype = Object.create(Traits.prototype);
Talents.prototype._configName = 'talent';
Talents.prototype.process = function (subject) {
var talents = this.getParameter(), // always an []
l = talents.length,
i;
for (i = 0; i < l; i++) {
this._applyTo(subject, talents[i]);
}
};
module.exports = Talents;