Skip to content

Commit

Permalink
whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
t-kalinowski committed Nov 4, 2024
1 parent 85d8033 commit 6c824b7
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions vignettes/classes-objects.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -322,12 +322,14 @@ You can make a property required by the constructor either by:

```{r}
Person <- new_class("Person", properties = list(
name = new_property(class_character,
validator = function(value) {
if (length(value) != 1 || is.na(value) || value == "")
"must be a non-empty string"
}))
)
name = new_property(
class_character,
validator = function(value) {
if (length(value) != 1 || is.na(value) || value == "")
"must be a non-empty string"
}
)
))
try(Person())
Expand Down

0 comments on commit 6c824b7

Please sign in to comment.