0x1b36
  .   ˆ{‹„„-i[D<†ªoZƒ›Ù«Å‚l_‘I|¥‰ÓMdœv ©ƒ†ü+=ÅÄ ö    ‹      Í”QoÚ0…ßû+<?ì-¹Pè6µŽ§Ž �¢LÓ4íÁÄ±šØ–mH»_?‡€šU m/Ó¤HN®?ßœsb‡¼Jç£Õ×Å}\ÝMÑâó‡éd„pðe0HWi;1Œ{}€ñ#\xo®êºŽëA¬íVK(|UÁy+3sÏ1½ M�^ RÆÃˆˆ—¾t¢¸xD:G ·ÞI.Bg³]—2;€ëÊ�Šç²1•ŽgZ›ð"®39Wé!l�W0+À‹ÇRîöc•G\:|'�ã|äŒTJX­Ž ÒÈZó§Fqÿ?PDìÃbë½ÈæÖRâ´c¥Ü¨{m0%²Ú g³ƒÌ´r°.™zˆ72Çˆ•>Áß&£ù÷À�/šÕ”0TX‘'øý(™ÝÌ“Ó«vš¹Ì-¦Sæ<ª4—¹ü,|ßÂ÷òÇù†iË¤ÂeV/µzF!XìZÍté^¯‚ƒÂv©á¿Kƒe¿„±¸]Žg«t²l#áM‹guÿò[cºóÊ£TZ‘ymŸ1´š^«µ37ÇGt0iå¦ð˜"¡“ä_$³UJ×ªNþd,�m«1}Qè
¡ô²×õÞ„]®¯†�ãwŸÎ[úÃ-‡ÃB`�	´¿žŸÏÿ·Ý    5   	ˆl–Ðz¾”ŠeJe@µpA¸ÔÅ£�þBÜY¹DàšŽ9BùÈƒi¶ZÇÆÅ ¶    	library(glue)

# set up the boilerplate for a new step or check
# creates a prefilled script in /R
# and an empty script in /tests
# consider using @inheritParams where appropriate instead of full boilerplate
make_new <- function(name,
                     which = c("step", "check")) {
  which <- match.arg(which)
  stopifnot(is.character(name))

  in_recipes_root <-
    tail(stringr::str_split(getwd(), "/")[[1]], 1) == "recipes"
  if (!in_recipes_root) {
    rlang::abort("Change working directory to package root")
  }

  if (glue::glue("{name}.R") %in% list.files("./R")) {
    rlang::abort("step or check already present with this name in /R")
  }

  boilerplate <-
    glue("
{create_documentation(name, which)}
{create_function(name, which)}
{create_generator(name, which)}
{create_prep_method(name, which)}
{create_bake_method(name, which)}
{create_print_method(name, which)}
{create_tidy_method(name, which)}
    ")

  file.create(glue("./R/{name}.R"))
  cat(boilerplate, file = glue("./R/{name}.R"))
  file.create(glue("./tests/testthat/test_{name}.R"))
}

create_documentation <- function(name,
                                 which) {
  glue("
#' <Title>
#'
#' `{which}_{name}` creates a *specification* of a recipe
#'  {which} that <what it does>
#'
#' @param recipe A recipe object. The {which} will be added to the
#'  sequence of operations for this recipe.
#' @param ... One or more selector functions to choose which
#'  variables are affected by the step. See [selections()]
#'  for more details. For the `tidy` method, these are not
#'  currently used.
#' @param role Not used by this step since no new variables are
#'  created. <change if role is used>
#' @param trained A logical to indicate if the quantities for
#'  preprocessing have been estimated.
#' <additional args here>
#' @param skip A logical. Should the step be skipped when the
#'  recipe is baked by [bake()]? While all operations are baked
#'  when [prep()] is run, some operations may not be able to be
#'  conducted on new data (e.g. processing the outcome variable(s)).
#'  Care should be taken when using `skip = TRUE` as it may affect
#'  the computations for subsequent operations
#' @param id A character string that is unique to this step to identify it.
#' @return <describe return>
#'
#' @export
#' @details <describe details>
#'
#' # Tidying
#'
#' When you [`tidy()`][tidy.recipe()] this step, a tibble with columns
#' <describe tidying> is returned.
#'
#' @examples

  ")
}

create_function <- function(name, which) {
  glue('
{which}_{name} <-
    function(recipe,
             ...,
             role = NA,
             trained = FALSE,
             <additional args here>
             skip = FALSE,
             id = rand_id("{name}")) {{
      add_{which}(
        recipe,
        {which}_{name}_new(
          terms = enquos(...),
          trained = trained,
          role = role,
          <additional args here>
          skip = skip,
          id = id
        )
      )
    }}

')
}

create_generator <- function(name, which) {
  glue('
  {which}_{name}_new <-
    function(terms, role, <additional args here>, na_rm, skip, id) {{
      step(
        subclass = "{name}",
        terms = terms,
        role = role,
        trained = trained,
        <additional args here>
        skip = skip,
        id = id
      )
    }}

  ')
}

create_prep_method <- function(name, which) {
  glue('
prep.{which}_{name} <- function(x, training, info 