new_trick: Create a new trick

View source: R/new_trick.R

new_trickR Documentation

Create a new trick

Description

Create a trick object

Usage

new_trick(label, condition, action, description = label, ...)

Arguments

label

A string

condition

A call or a one sided formula, using condition helpers and context informers, whose right hand side expressions returns a boolean when evaluated by tricks

action

A call or a one sided formula, using action helpers and context informers, whose right hand side triggers the desired actions when evaluated by tricks

description

The description of the trick, for documentation purposes

...

other properties to print with the object and in YAML files

Value

A list of class "trick_object"

Examples

new_trick(
"Edit user '.Rprofile'",
~ selection_is_empty(),
~ usethis::edit_r_profile()
)

moodymudskipper/poof documentation built on Dec. 10, 2024, 12:07 a.m.