R/getTags.R

Defines functions getTags.smoof_generator getTags.smoof_wrapped_function getTags.smoof_function getTags

Documented in getTags

#' Returns the vector of associated tags.
#'
#' @template arg_smoof_function
#' @return [\code{character}]
#'  Vector of associated tags.
#' @export
getTags = function(fn) {
  UseMethod("getTags")
}

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

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

#' @export
getTags.smoof_generator = function(fn) {
  return(attr(fn, "tags"))
}
jakobbossek/smoof documentation built on Feb. 17, 2024, 2:23 a.m.