Skip to content

Commit

Permalink
Note the general applicability of this technique
Browse files Browse the repository at this point in the history
  • Loading branch information
jennybc committed Aug 30, 2024
1 parent 1e0e382 commit 385b386
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion vignettes/wrappers.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ This is the key move:

> Include `.envir = parent.frame()` as an argument of the wrapper function and pass this `.envir` to the `.envir` argument of `glue()`.
If you'd like to understand why this is the way, keep reading.
If you'd like to know why this is the way, keep reading.
It pays off to understand this, because the technique applies more broadly than glue.
Once you recognize this setup, you'll see it in many functions in the withr, cli, and rlang packages (e.g. `withr::defer()`, `cli::cli_abort()`, `rlang::abort()`).

## Working example

Expand Down

0 comments on commit 385b386

Please sign in to comment.