| 1 |
as_override_type_sum_asis <- function(x) { |
| 2 |
structure(x, class = "override_type_sum_asis") |
| 3 |
} |
| 4 |
|
| 5 |
as_override_type_sum_custom <- function(x) { |
| 6 |
structure(x, class = "override_type_sum_custom") |
| 7 |
} |
| 8 |
|
| 9 |
local_override_type_sum <- function(frame = caller_env()) { |
| 10 |
local_methods( |
| 11 |
.frame = frame, |
| 12 |
type_sum.override_type_sum_asis = function(x, ...) { |
| 13 |
I("AsIs") |
| 14 |
}, |
| 15 |
# Needed for head() |
| 16 |
`[.override_type_sum_asis` = function(x, ...) { |
| 17 |
as_override_type_sum_asis(NextMethod()) |
| 18 |
}, |
| 19 |
type_sum.override_type_sum_custom = function(x, ...) { |
| 20 |
structure("VeryLong", class = "override_format_type_sum") |
| 21 |
}, |
| 22 |
# Needed for head() |
| 23 |
`[.override_type_sum_custom` = function(x, ...) { |
| 24 |
as_override_type_sum_custom(NextMethod()) |
| 25 |
}, |
| 26 |
format_type_sum.override_format_type_sum = function(x, ...) { |
| 27 |
"VeryLong" |
| 28 |
} |
| 29 |
) |
| 30 |
} |