@@ -54,6 +54,15 @@ Validate specific S3 types:
5454 [`check_list_of()`](https://lj-jenkins.github.io/favr/reference/s3-type-checks.md)
5555 for their respective [vctrs](https://vctrs.r-lib.org) classes.
5656
57+ Validate OOP types:
58+
59+ - [`check_s3()`](https://lj-jenkins.github.io/favr/reference/oop-checks.md),
60+ [`check_s4()`](https://lj-jenkins.github.io/favr/reference/oop-checks.md),
61+ [`check_s7()`](https://lj-jenkins.github.io/favr/reference/oop-checks.md)
62+ and
63+ [`check_r6()`](https://lj-jenkins.github.io/favr/reference/oop-checks.md)
64+ for their respective OOP types.
65+
5766Modify the behaviour of type-checking functions:
5867
5968- [`bare()`](https://lj-jenkins.github.io/favr/reference/modifiers.md)
@@ -234,8 +243,12 @@ check_integer(x)
234243check_scalar_double(x)
235244#> Error:
236245#> ! `x` must be a scalar <double>, but it is of length 3.
246+ check_s3(x)
247+ #> Error:
248+ #> ! `x` must be an <S3> object, not <numeric>.
237249
238250df <- data.frame(x = 1:3, y = 1:3)
251+ check_s3(df)
239252check_tibble(df)
240253#> Error:
241254#> ! `df` must inherit from <tbl_df>, but is class <data.frame>.
@@ -499,6 +512,11 @@ Strongly typed validation.
499512 [`check_scalar_bytes()`](https://lj-jenkins.github.io/favr/reference/scalar-type-checks.md)
500513 [`check_scalar_numeric()`](https://lj-jenkins.github.io/favr/reference/scalar-type-checks.md)
501514 : Scalar type checks
515+ - [`check_s3()`](https://lj-jenkins.github.io/favr/reference/oop-checks.md)
516+ [`check_s4()`](https://lj-jenkins.github.io/favr/reference/oop-checks.md)
517+ [`check_s7()`](https://lj-jenkins.github.io/favr/reference/oop-checks.md)
518+ [`check_r6()`](https://lj-jenkins.github.io/favr/reference/oop-checks.md)
519+ : Check if an object is of a specific object-oriented programming type
502520
503521### Values
504522
0 commit comments