R6 method for ExTera: add templates to library from character
strings.
$add_string_templates(...)Examples
tera <- new_engine()
tera$add_string_templates(
"hello-world" = '<p>Hello {{ x }}. This is {{ y }}.</p>',
"img-src" = '<img src="{{ img_src }}">'
)
tera
#> ── ExTera ──
#> Template library:
#> • hello-world
#> • img-src