Skip to content

Commit

Permalink
Add suggested doc changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
t-kalinowski committed Sep 10, 2024
1 parent f381fca commit f264c39
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
9 changes: 6 additions & 3 deletions R/property.R
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@
#' The validator will be called after the `class` has been verified, so
#' your code can assume that `value` has known type.
#' @param default When an object is created and the property is not supplied,
#' what should it default to? If `NULL`, defaults to the "empty" instance
#' of `class`.
#' what should it default to? If `NULL`, it defaults to the "empty" instance
#' of `class`. This can also be a quoted call, which then becomes a standard
#' function promise in the default constructor, evaluated at the time the
#' object is constructed.
#' @param name Property name, primarily used for error messages. Generally
#' don't need to set this here, as it's more convenient to supply as a
#' the element name when defining a list of properties. If both `name`
Expand Down Expand Up @@ -65,7 +67,8 @@
#'
#' # Because the property is dynamic, it is not included as an
#' # argument to the default constructor
#' "now" %in% names(formals(clock)) # FALSE
#' try(clock(now = 10))
#' args(clock)
#'
#' # These can be useful if you want to deprecate a property
#' person <- new_class("person", properties = list(
Expand Down
15 changes: 9 additions & 6 deletions man/new_property.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f264c39

Please sign in to comment.