Skip to content

Commit

Permalink
add prop_is_read_only() to check for a read-only property
Browse files Browse the repository at this point in the history
  • Loading branch information
lawremi committed Aug 24, 2024
1 parent 6e4e996 commit 2812f55
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions R/property.R
Original file line number Diff line number Diff line change
Expand Up @@ -453,3 +453,7 @@ as_property <- function(x, name, i) {
new_property(x, name = name)
}
}

prop_is_read_only <- function(x) {
!is.null(x$getter) && is.null(x$setter)
}

0 comments on commit 2812f55

Please sign in to comment.