use of com.samskivert.mustache.Template in project cw-omnibus by commonsguy.
the class MainActivity method printReport.
private void printReport() {
Template tmpl = Mustache.compiler().compile(getString(R.string.report_body));
WebView print = prepPrintWebView(getString(R.string.tps_report));
print.loadData(tmpl.execute(new TpsReportContext(prose.getText().toString())), "text/html", "UTF-8");
}
use of com.samskivert.mustache.Template in project spring-boot by spring-projects.
the class MustacheWebIntegrationTests method contextLoads.
@Test
public void contextLoads() {
String source = "Hello {{arg}}!";
Template tmpl = Mustache.compiler().compile(source);
Map<String, String> context = new HashMap<>();
context.put("arg", "world");
// returns "Hello
assertThat(tmpl.execute(context)).isEqualTo("Hello world!");
// world!"
}
Aggregations