Skip to content

Commit

Permalink
delete unused helper
Browse files Browse the repository at this point in the history
  • Loading branch information
t-kalinowski committed Nov 4, 2024
1 parent 29656ad commit 5afe513
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions R/generic.R
Original file line number Diff line number Diff line change
Expand Up @@ -189,26 +189,6 @@ methods_rec <- function(x, signature) {
unlist(methods, recursive = FALSE)
}

make_method_name <- function(generic, chr_signature) {
name <- sprintf("%s@methods$%s",
generic@name,
paste0(chr_signature, collapse = "$"))

pkgname <- topNamespaceName(environment(generic))
if (is.null(pkgname))
return(name)

for (get in c("::", ":::")) {
tryCatch({
generic2 <- eval(call(get, as.name(pkgname), as.name(generic@name)), baseenv())
if (identical(generic, generic2))
return(paste0(c(pkgname, get, name), collapse = ""))
}, error = function(e) NULL)
}

name
}

generic_add_method <- function(generic, signature, method) {
p_tbl <- generic@methods
chr_signature <- vcapply(signature, class_register)
Expand Down

0 comments on commit 5afe513

Please sign in to comment.