diff --git a/DESCRIPTION b/DESCRIPTION index 469cf90..977ab34 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -28,7 +28,7 @@ Suggests: testthat (>= 3.0.0) Remotes: jonthegeek/stbl, - rconsortium/S7 + rconsortium/S7#343 Config/testthat/edition: 3 Config/testthat/parallel: true Encoding: UTF-8 diff --git a/NAMESPACE b/NAMESPACE index 3479825..669a757 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,11 +1,5 @@ # Generated by roxygen2: do not edit by hand -S3method(length,"rapid::contact") -S3method(length,"rapid::info") -S3method(length,"rapid::license") -S3method(length,"rapid::rapid") -S3method(length,"rapid::servers") -S3method(length,"rapid::string_replacements") export(as_contact) export(as_info) export(as_license) diff --git a/R/info-01-contact.R b/R/info-01-contact.R index 1086c5c..b0f2c1d 100644 --- a/R/info-01-contact.R +++ b/R/info-01-contact.R @@ -34,8 +34,7 @@ contact <- S7::new_class( ) ) -#' @export -`length.rapid::contact` <- function(x) { +S7::method(length, contact) <- function(x) { max(lengths(S7::props(x))) } diff --git a/R/info-01-license.R b/R/info-01-license.R index d69d3e4..3028a2e 100644 --- a/R/info-01-license.R +++ b/R/info-01-license.R @@ -49,8 +49,7 @@ license <- S7::new_class( } ) -#' @export -`length.rapid::license` <- function(x) { +S7::method(length, license) <- function(x) { max(lengths(S7::props(x))) } diff --git a/R/info-zz-info.R b/R/info-zz-info.R index df517f8..d41cbf1 100644 --- a/R/info-zz-info.R +++ b/R/info-zz-info.R @@ -82,8 +82,7 @@ info <- S7::new_class( } ) -#' @export -`length.rapid::info` <- function(x) { +S7::method(length, info) <- function(x) { max(lengths(S7::props(x))) } diff --git a/R/servers-01-string_replacements.R b/R/servers-01-string_replacements.R index 53ec1b5..d34791a 100644 --- a/R/servers-01-string_replacements.R +++ b/R/servers-01-string_replacements.R @@ -73,8 +73,7 @@ string_replacements <- S7::new_class( } ) -#' @export -`length.rapid::string_replacements` <- function(x) { +S7::method(length, string_replacements) <- function(x) { length(x@name) } diff --git a/R/servers-zz-servers.R b/R/servers-zz-servers.R index c75eb1d..be24c21 100644 --- a/R/servers-zz-servers.R +++ b/R/servers-zz-servers.R @@ -63,8 +63,7 @@ servers <- S7::new_class( } ) -#' @export -`length.rapid::servers` <- function(x) { +S7::method(length, servers) <- function(x) { length(x@url) } diff --git a/R/zz-rapid.R b/R/zz-rapid.R index c2e6fe1..fad2c0a 100644 --- a/R/zz-rapid.R +++ b/R/zz-rapid.R @@ -54,8 +54,7 @@ rapid <- S7::new_class( } ) -#' @export -`length.rapid::rapid` <- function(x) { +S7::method(length, rapid) <- function(x) { length(x@info) }