Skip to content

Commit ab1baf7

Browse files
committed
use class_missing in class_missing example
1 parent 1d3a5f6 commit ab1baf7

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

R/special.R

+2
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@
1010
#' @examples
1111
#' foo <- new_generic("foo", "x")
1212
#' method(foo, class_numeric) <- function(x) "number"
13+
#' method(foo, class_missing) <- function(x) "missing"
1314
#' method(foo, class_any) <- function(x) "fallback"
1415
#'
1516
#' foo(1)
1617
#' foo()
18+
#' foo("")
1719
class_missing <- structure(list(), class = "S7_missing")
1820

1921
is_class_missing <- function(x) inherits(x, "S7_missing")

man/class_missing.Rd

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)