
Rendered mighty standard component
Source:R/mighty_component_rendered.R
mighty_component_rendered.RdClass for a rendered mighty standard component.
Once rendered a component can be used to:
Stream into an R script
Evaluate the generated code in an environment
Test code against expected output
Calculate test coverage
Super class
mighty.component::mighty_component -> mighty_component_rendered
Methods
Method new()
Create standard component from rendered template.
Usage
mighty_component_rendered$new(template, id)Method print()
Print rendered component
Method eval()
Evaluate code in a specified environment.
Usage
mighty_component_rendered$eval(envir = parent.frame())Arguments
envirEnvironment to evaluate in. Parsed to
eval(). Defaults to using the current environment withparent.frame().
Method test()
Test component against expected output.
Usage
mighty_component_rendered$test(
expected,
value = "domain",
envir = parent.frame()
)Arguments
expectedThe expected output in
valueafter evaluationvalueName of the object used to compare against after evaluating the component. Defaults to
"domain".envirParent environment to use for evaluation of test code. Defaults to using the current environment with
parent.frame().