Conversation
t-kalinowski
left a comment
There was a problem hiding this comment.
Looks good to me. I tried it out in ellmer with a few variations.
One other note: the @prop syntax is nice, but on Rd pages where many classes are documented together, there is currently no way to tie a property back to its owner. For example, ?ellmer::Content currently documents 9 classes together. If you add @prop foo foo to one of the subclasses, the rendered page has a flat Additional properties section, but it is impossible to tell which class the @foo property belongs to.
| #' @param x A `Range` object. | ||
| #' @param ... Not used. | ||
| #' @returns A single number. | ||
| method(size, Range) <- function(x, ...) { |
There was a problem hiding this comment.
This is really nice how it "just works" without any special syntax!
| #' @export | ||
| size <- new_generic("size", "x") | ||
|
|
||
| #' @rdname size |
There was a problem hiding this comment.
What do you think about making generation of docs for registered methods 'opt-out' with @nord rather than 'opt-in' with @rdname size?
There was a problem hiding this comment.
Unfortunately I think that ship has sailed, because I think we want to be consistent with S3, and changing that would affect a lot of existing code.
|
I like the idea of being able to specify multiple properties in the same Rd topic, but there's currently no way obvious way to pass the class name into the correct tag object. So I made it possible for the user to supply with |
Fixes #1484