I have a child R6Class
inheriting a parent class that only has a few private methods, a public property and an initialize
method. The child class also has an initialize
method that adds a couple of functionalities to the inherited one. In the end, the documentation of the parent initialize
is essentially a duplicate of the child one (minus the extra params). I only export the child class.
E.g.:
ParentClass <- R6Class(
"ParentClass",
public = list(
property = NULL,
initialize = function(x) {
self$property <- x
}
),
private = list(
# more methods here
)
)
#' @description ParentClass
#' @export
ChildClass <- R6Class(
"ChildClass",
inherit = ParentClass,
public = list(
#' @field A property
property2 = NULL,
#' @description Create a `ParentClass` object.
#' @param x Description of param x.
#' @param y Description of param y.
initialize = function(x, y) {
super$initialize(x)
self$property2 <- y
},
# more public methods
)
)
What's the correct approach when documenting such classes? I'd like to ignore the parent class documentation which is mostly repetitive and not informative for external users but devtools
asks me to document the parent class as well. Is there a way to tell devtools
to simply ignore the parent class when building the doc?