Skip to content

Commit

Permalink
small change to documentation for as_api_object (#85)
Browse files Browse the repository at this point in the history
* small change to documentation for as_api_object

* Tweak as_api_object documentation

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!

---------

Co-authored-by: Jon Harmon <[email protected]>
  • Loading branch information
jimrothstein and jonthegeek authored Apr 19, 2024
1 parent 0bb15ec commit 0d09d6a
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 object 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 0d09d6a

Please sign in to comment.