Skip to contents

Class for a rendered mighty component.

Once rendered a component can be used to:

  • Stream into an R script

  • Evaluate the generated code in an environment

Super class

mighty_component -> mighty_component_rendered

Methods

Inherited methods


mighty_component_rendered$new()

Create component from rendered template.

Usage

mighty_component_rendered$new(template, id)

Arguments

template

character Rendered template such as output from mighty_component$render().

id

character ID of the component.


mighty_component_rendered$print()

Print rendered component

Usage

mighty_component_rendered$print()

Returns

(invisible) self


mighty_component_rendered$stream()

Stream rendered code into a script (appended)

Usage

mighty_component_rendered$stream(path)

Arguments

path

character(1) path to the R script to stream code into.


mighty_component_rendered$eval()

Evaluate code in a specified environment.

Usage

mighty_component_rendered$eval(envir = parent.frame())

Arguments

envir

Environment to evaluate in. Parsed to eval(). Defaults to using the current environment with parent.frame().


mighty_component_rendered$clone()

The objects of this class are cloneable with this method.

Usage

mighty_component_rendered$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.