Skip to content

Commit

Permalink
Tweak as_api_object documentation
Browse files Browse the repository at this point in the history
I originally wrote this for lists, but it also works for character vectors, and may eventually expand to other objects like data frames. Thanks for catching the mismatch! Hopefully this fix makes as much sense as this can!
  • Loading branch information
jonthegeek committed Apr 19, 2024
1 parent 3d6876b commit bda5e25
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
9 changes: 5 additions & 4 deletions R/as.R
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
#' Convert to a rapid-style object
#'
#' Convert a named list into an object with a rapid-style class.
#' Convert an object into an object with a rapid-style class.
#'
#' @inheritParams rlang::args_dots_empty
#' @inheritParams rlang::args_error_context
#' @param x The named list to coerce. Must be empty or have names corresponding to
#' the parameter of the `target_class`, or names that can be coerced to those
#' names via [snakecase::to_snake_case()]. Extra names are ignored.
#' @param x The object to coerce. Must be empty, or be a named list or character
#' vector having names corresponding to the parameter of the `target_class`,
#' or names that can be coerced to those names via
#' [snakecase::to_snake_case()]. Extra names are ignored.
#' @param target_class The S7 class to which the object should be converted.
#' @param alternate_names Character vector (optional). An optional named
#' character vector, where the names are the names as they might appear in
Expand Down
9 changes: 5 additions & 4 deletions man/as_api_object.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit bda5e25

Please sign in to comment.