Skip to content

Commit 7578bca

Browse files
committed
refactor: rename path to pkg in R/pkg_tools.R
1 parent 8c3c075 commit 7578bca

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

R/pkg_tools.R

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# Getting the DESCRIPTION file in a data.frame
22
daf_desc <- function(
3-
path = get_golem_wd(),
3+
pkg = get_golem_wd(),
44
entry) {
55
as.character(
66
unlist(
77
unname(
88
as.data.frame(
99
read.dcf(
1010
normalizePath(
11-
fs_path(path, "DESCRIPTION")
11+
fs_path(pkg, "DESCRIPTION")
1212
)
1313
)
1414
)[entry]
@@ -22,19 +22,19 @@ daf_desc <- function(
2222
#' These are functions to help you navigate
2323
#' inside your project while developing
2424
#'
25-
#' @param path Path to use to read the DESCRIPTION
25+
#' @param pkg Path to use to read the DESCRIPTION
2626
#'
2727
#' @export
2828
#' @rdname pkg_tools
2929
#'
3030
#' @return The value of the entry in the DESCRIPTION file
31-
pkg_name <- function(path = get_golem_wd()) {
32-
daf_desc(path, "Package")
31+
pkg_name <- function(pkg = get_golem_wd()) {
32+
daf_desc(pkg, "Package")
3333
}
3434
#' @export
3535
#' @rdname pkg_tools
36-
pkg_version <- function(path = get_golem_wd()) {
37-
daf_desc(path, "Version")
36+
pkg_version <- function(pkg = get_golem_wd()) {
37+
daf_desc(pkg, "Version")
3838
}
3939
#' @export
4040
#' @rdname pkg_tools

0 commit comments

Comments
 (0)