Skip to content

Commit

Permalink
rename method
Browse files Browse the repository at this point in the history
  • Loading branch information
wlandau committed Nov 8, 2024
1 parent ac7344c commit 24ea885
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion R/class_junction.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ junction_upstream_edges <- function(junction) {
data_frame(from = from, to = to)
}

junction_get_splits <- function(junction) {
junction_splits <- function(junction) {
as.character(junction$splits)
}

Expand Down
2 changes: 1 addition & 1 deletion R/class_pattern.R
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ pattern_s3_class <- c("tar_pattern", "tar_target")

#' @export
target_get_children.tar_pattern <- function(target) {
junction_get_splits(target$junction)
junction_splits(target$junction)
}

#' @export
Expand Down
2 changes: 1 addition & 1 deletion R/class_stem.R
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ target_get_children.tar_stem <- function(target) {
if_any(
is.null(target$junction),
character(0),
junction_get_splits(target$junction)
junction_splits(target$junction)
)
}

Expand Down
6 changes: 3 additions & 3 deletions tests/testthat/test-class_junction.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ tar_test("junction deps", {
expect_equal(out, exp)
})

tar_test("junction_get_splits()", {
tar_test("junction_splits()", {
x <- junction_init("x", letters, list(a = LETTERS, b = rev(letters)))
expect_equal(junction_get_splits(x), letters)
expect_equal(junction_splits(x), letters)
})

tar_test("junction_invalidate()", {
x <- junction_init("x", letters, list(a = LETTERS, b = rev(letters)))
junction_invalidate(x)
expect_equal(junction_get_splits(x), rep(NA_character_, length(x$splits)))
expect_equal(junction_splits(x), rep(NA_character_, length(x$splits)))
})

tar_test("junction_upstream_edges()", {
Expand Down

0 comments on commit 24ea885

Please sign in to comment.