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 -> mighty_component_rendered

Methods

Inherited methods


Method 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. Either name of standard or path to local.


Method print()

Print rendered component

Usage

mighty_component_rendered$print()

Returns

(invisible) self


Method 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.


Method 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().


Method 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.