diff --git a/R/qenv-get_code.R b/R/qenv-get_code.R index ce5dd4399..0c23cb8df 100644 --- a/R/qenv-get_code.R +++ b/R/qenv-get_code.R @@ -3,6 +3,7 @@ #' @name get_code #' @param object (`qenv`) #' @param deparse (`logical(1)`) if the returned code should be converted to character. +#' @param ... arguments passed to methods. #' @return named `character` with the reproducible code. #' @examples #' q1 <- new_qenv(env = list2env(list(a = 1)), code = quote(a <- 1)) @@ -11,7 +12,7 @@ #' get_code(q3) #' get_code(q3, deparse = FALSE) #' @export -setGeneric("get_code", function(object, deparse = TRUE) { +setGeneric("get_code", function(object, deparse = TRUE, ...) { # this line forces evaluation of object before passing to the generic # needed for error handling to work properly grDevices::pdf(nullfile()) diff --git a/man/get_code.Rd b/man/get_code.Rd index ed6008376..453afb15f 100644 --- a/man/get_code.Rd +++ b/man/get_code.Rd @@ -6,7 +6,7 @@ \alias{get_code,qenv.error-method} \title{Get code from \code{qenv}} \usage{ -get_code(object, deparse = TRUE) +get_code(object, deparse = TRUE, ...) \S4method{get_code}{qenv}(object, deparse = TRUE) @@ -16,6 +16,8 @@ get_code(object, deparse = TRUE) \item{object}{(\code{qenv})} \item{deparse}{(\code{logical(1)}) if the returned code should be converted to character.} + +\item{...}{arguments passed to methods.} } \value{ named \code{character} with the reproducible code.