Skip to contents

This function is exported so that developers can add their own props in new packages, without needing to re-implement the prop and script classes themselves. It is not expected that end users will need this function.


add_prop(script, prop, exec = TRUE)



A script object (from make_script) to append the prop to.


A unifir_prop object (from unifir_prop) to add to the script.


Logical: Should the method created by the prop be called in the MainFunc method?


script <- make_script("example_script", unity = waiver())
prop <- unifir_prop(
  prop_file = waiver(), # Must be a file that exists or waiver()
  method_name = NULL, # Auto-generated if NULL or NA
  method_type = "ExampleProp", # Length-1 character vector
  parameters = list(), # Not validated, usually a list
  build = function(script, prop, debug) {},
  using = character(0)
script <- add_prop(script, prop)