all files / gluebert/src/template/ template.abstract.js

0% Statements 0/3
100% Branches 0/0
0% Functions 0/3
0% Lines 0/3
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33                                                                 
/**
 * Class represents TemplateAbstract
 */
class TemplateAbstract {
 
    /**
     * create TemplateAbstract instance
     * @param {function} engine - template engine
     * */
    constructor(engine) {
        this.engine = engine;
    }
 
    /**
     * create view
     */
    createView() {
        throw new Error('Template engine must provide a .createView() method');
    }
 
    /**
     * actual render function of the template and the data
     */
    render() {
        throw new Error('Template engine must provide a .render() method');
    }
 
}
 
export {
    TemplateAbstract,
};