R/getDescription.R

Defines functions getDescription.smoof_wrapped_function getDescription.smoof_function getDescription

Documented in getDescription

#' Return the description of the function.
#'
#' @template arg_smoof_function
#' @return [\code{character(1)}]
#' @export
getDescription = function(fn) {
  UseMethod("getDescription")
}

#' @export
getDescription.smoof_function = function(fn) {
  return(attr(fn, "description"))
}

#' @export
getDescription.smoof_wrapped_function = function(fn) {
  return(getDescription(getWrappedFunction(fn)))
}

Try the smoof package in your browser

Any scripts or data that you put into this service are public.

smoof documentation built on March 31, 2023, 11:48 p.m.