1 // !code vendor/crayon/lib/crayon.js 2 // !code vendor/crayon/vendor/ejs/ejs_production.js 3 /** 4 * @class 5 * @namespace Provides template utilities. 6 * @requires crayon/lib/core.js 7 * @requires crayon/vendor/ejs/ejs_production.js 8 */ 9 Crayon.Template = { 10 /** 11 * Returns the text using the <tt>t</tt> template with <tt>b</tt> bindings. 12 */ 13 render: function(t, b){ 14 return new EJS({text: t}).render(b || {}); 15 } 16 }; 17 18 if( !this.do_not_import_global ){ 19 Crayon.extend(this, Crayon.Template); 20 }else{ 21 Crayon.extend(Crayon.Template); 22 } 23