File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 3232# ' The validator will be called after the `class` has been verified, so
3333# ' your code can assume that `value` has known type.
3434# ' @param default When an object is created and the property is not supplied,
35- # ' what should it default to? If `NULL`, defaults to the "empty" instance
36- # ' of `class`.
35+ # ' what should it default to? If `NULL`, it defaults to the "empty" instance
36+ # ' of `class`. This can also be a quoted call, which then becomes a standard
37+ # ' function promise in the default constructor, evaluated at the time the
38+ # ' object is constructed.
3739# ' @param name Property name, primarily used for error messages. Generally
3840# ' don't need to set this here, as it's more convenient to supply as a
3941# ' the element name when defining a list of properties. If both `name`
6567# '
6668# ' # Because the property is dynamic, it is not included as an
6769# ' # argument to the default constructor
68- # ' "now" %in% names(formals(clock)) # FALSE
70+ # ' try(clock(now = 10))
71+ # ' args(clock)
6972# '
7073# ' # These can be useful if you want to deprecate a property
7174# ' person <- new_class("person", properties = list(
You can’t perform that action at this time.
0 commit comments