R/object_utils.R

Defines functions validate_object_type

validate_object_type <- function(obj, obj_name){
  if(typeof(obj) != "environment"){
    stop("Object must be of type environment")
  }
  if(!all(class(obj) == c(obj_name, "R6"))){
    stop("Object must be of class ", obj_name, " not ", class(obj))
  }
}
CRI-iAtlas/iatlasModules2 documentation built on Dec. 21, 2024, 3:39 p.m.