whisker_get_all: Get template values from the call stack

Description Usage Arguments Value See Also Examples

View source: R/whisker_get_all.R

Description

Introspect template and get values from their first appearance on the call stack.

Usage

1
whisker_get_all(template, ...)

Arguments

template

character; a whisker template

...

additional arguments passed to get

whisker_get_all searches the call stack to find the variables in a whisker template.

Value

list containing the names and values from the template. If a value is not found, NA is returned.

See Also

get
whisker_names

Examples

1
2
3
4
5
6
7
8
  a=1; z=26

  tmpl = "A is rank {{a}}; z is rank {{z}}; {{w}}"
  whisker_get_all( tmpl )

  # In function:
  f <- function( template ) whisker_get_all( template )
  f(tmpl)

decisionpatterns/whisker.tools documentation built on July 1, 2020, 4:18 p.m.