const Element = require('../primitives/Element'); /** * @class RefElement * * @param content * @param meta * @param attributes * * @extends Element */ module.exports = class RefElement extends Element { constructor(content, meta, attributes) { super(content || [], meta, attributes); this.element = 'ref'; if (!this.path) { this.path = 'element'; } } /** * Path of referenced element to transclude instead of element itself. * @type StringElement * @default element */ get path() { return this.attributes.get('path'); } set path(newValue) { this.attributes.set('path', newValue); } };