| 1 |
new_foo_tbl <- function(..., class = NULL) { |
| 2 |
stopifnot(is.null(class)) |
| 3 |
new_tbl(..., class = "foo_tbl") |
| 4 |
} |
| 5 |
|
| 6 |
local_foo_tbl <- function(frame = caller_env()) { |
| 7 |
local_methods( |
| 8 |
.frame = frame, |
| 9 |
tbl_sum.foo_tbl = function(x) { |
| 10 |
c(NextMethod(), foo = "bar") |
| 11 |
} |
| 12 |
) |
| 13 |
} |