cocktail
Version:
CocktailJS is a small library to explore traits, talents, inheritance and annotations concepts in nodejs - Shake your objects and classes with Cocktail!
36 lines (25 loc) • 615 B
JavaScript
/*
*
* Copyright (c) 2013 - 2016 Maximiliano Fierro
* Licensed under the MIT license.
*/
;
var sequence = require('../sequence');
function Annotation () {}
Annotation.prototype = {
retain : false,
priority : sequence.ANNOTATION,
name : '@annotation',
_value: undefined,
setParameter: function (value) {
this._value = value;
},
getParameter: function () {
return this._value;
},
process: function (subject) {
var name = '@' + this.getParameter();
subject.prototype.name = name;
}
};
module.exports = Annotation;