Skip to content

Commit 407f9cd

Browse files
committed
manually register all methods (#9)
1 parent 003770c commit 407f9cd

File tree

3 files changed

+6
-12
lines changed

3 files changed

+6
-12
lines changed

NAMESPACE

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,8 @@ S3method(as.data.frame,blob)
1313
S3method(c,blob)
1414
S3method(format,blob)
1515
S3method(is.na,blob)
16-
S3method(is_vector_s3,blob)
17-
S3method(obj_sum,blob)
1816
S3method(print,blob)
19-
S3method(type_sum,blob)
2017
export(as.blob)
2118
export(blob)
2219
export(new_blob)
2320
importFrom(methods,setOldClass)
24-
importFrom(pillar,is_vector_s3)
25-
importFrom(pillar,obj_sum)
26-
importFrom(pillar,type_sum)

R/format.R

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,17 @@ print.blob <- function(x, ...) {
1515
}
1616
}
1717

18-
#' @export
19-
#' @importFrom pillar type_sum
18+
# Dynamically exported, see zzz.R
2019
type_sum.blob <- function(x) {
2120
"blob"
2221
}
2322

24-
#' @export
25-
#' @importFrom pillar obj_sum
23+
# Dynamically exported, see zzz.R
2624
obj_sum.blob <- function(x) {
2725
format(x, trim = FALSE)
2826
}
2927

30-
#' @export
31-
#' @importFrom pillar is_vector_s3
28+
# Dynamically exported, see zzz.R
3229
is_vector_s3.blob <- function(x) TRUE
3330

3431
blob_size <- function(x, digits = 3, trim = TRUE, ...) {

R/zzz.R

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# nocov start
22
.onLoad <- function(...) {
33
register_s3_method("pillar", "pillar_shaft", "blob")
4+
register_s3_method("pillar", "is_vector_s3", "blob")
5+
register_s3_method("pillar", "type_sum", "blob")
6+
register_s3_method("pillar", "obj_sum", "blob")
47

58
invisible()
69
}

0 commit comments

Comments
 (0)