Skip to content

Commit

Permalink
Parse specs supplied as urls without url wrapper.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonthegeek committed Dec 15, 2024
1 parent 1932fb4 commit b3537e0
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions R/zz-rapid.R
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,17 @@ S7::method(as_rapid, S7::new_S3_class("url")) <- function(x,
as_rapid(x, ..., arg = arg, call = call)
}

S7::method(as_rapid, class_character) <- function(x,
...,
arg = caller_arg(x),
call = caller_env()) {
if (.is_url_string(x)) {
return(as_rapid(url(x), ..., arg = arg, call = call))
}
S7::super(x, to = class_any)
as_rapid(x, ..., arg = arg, call = call)
}

S7::method(as_rapid, class_list) <- function(x,
...,
arg = caller_arg(x),
Expand Down

0 comments on commit b3537e0

Please sign in to comment.