Description Usage Arguments Details Value Note See Also
Hand in hand with parsers, preprocessors are the heart of director. The idea is to allow the developer to do any additional stuff prior to sourcing an R file. For example, if some helper functions are desired or some operators should be overloaded for a DSL (domain-specific language), the preprocessor can perform this prior to sourcing the R file.
1 | preprocessor(object, ..., parse. = TRUE)
|
object |
active_resource. See |
... |
additional parameters to pass to the next layer in the resource parsing tower. |
parse. |
logical. Whether or not to apply the parser to the
resource. If |
To define a preprocessor for routes in a given path, you can use the
register_preprocessor
method on the director object.
The parsed resource if parse. = TRUE
, and the preprocessed
resource otherwise.
The parameters must be named object
and ...
due to
this method's inclusion in a tower
.
register_preprocessor
, active_resource
,
tower
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.