Skip to content

Commit 5e5d36d

Browse files
committed
restore method-register-S4.R; got lost in the rebase shuffle
1 parent 445095b commit 5e5d36d

2 files changed

Lines changed: 11 additions & 12 deletions

File tree

R/method-register-S4.R

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
register_S4_method <- function(
2+
generic,
3+
signature,
4+
method,
5+
env = parent.frame(),
6+
call = sys.call(-1L)
7+
) {
8+
S4_env <- topenv(env)
9+
S4_signature <- lapply(signature, S4_class, S4_env = S4_env, call = call)
10+
methods::setMethod(generic, S4_signature, method, where = S4_env)
11+
}

R/method-register.R

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -317,18 +317,6 @@ check_method <- function(
317317
invisible(TRUE)
318318
}
319319

320-
register_S4_method <- function(
321-
generic,
322-
signature,
323-
method,
324-
env = parent.frame(),
325-
call = sys.call(-1L)
326-
) {
327-
S4_env <- topenv(env)
328-
S4_signature <- lapply(signature, S4_class, S4_env = S4_env, call = call)
329-
methods::setMethod(generic, S4_signature, method, where = S4_env)
330-
}
331-
332320
#' @export
333321
print.S7_method <- function(x, ...) {
334322
signature <- method_signature(x@generic, x@signature)

0 commit comments

Comments
 (0)