Use the @enum roclet to automatically generate s7x documentation.
Details
Run use_roxygen() to add s7x::enum_roclet to the roclets in your
DESCRIPTION.
The roclet generates:
Enums: the title, description,
valueparam,variantsandallow_naproperties, returns and an example.Enums sharing an
@rdname: thevalueparam and a Variants section.S7 classes: a
@paramfor each property.
Examples
enum_roclet()
#> list()
#> attr(,"class")
#> [1] "roclet_enum" "roclet_rd" "roclet"
path <- tempfile()
dir.create(path)
writeLines("Package: example", file.path(path, "DESCRIPTION"))
use_roxygen(path)
#> ✔ Added "s7x::enum_roclet" to Roxygen.