Skip to content

Commit 20076b7

Browse files
committed
with_flair to decorated
1 parent ff9e308 commit 20076b7

File tree

4 files changed

+32
-2
lines changed

4 files changed

+32
-2
lines changed

NAMESPACE

+3-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ S3method(flair_lines,decorated)
66
S3method(flair_lines,default)
77
S3method(flair_rx,decorated)
88
S3method(flair_rx,default)
9+
S3method(knit_print,decorated)
910
S3method(mask_rx,decorated)
1011
S3method(mask_rx,default)
1112
S3method(print,decorated)
@@ -22,7 +23,7 @@ export(flair_input_vals)
2223
export(flair_lines)
2324
export(flair_quick)
2425
export(flair_rx)
25-
export(knit_print.decorated)
26+
export(is.decorated)
2627
export(mask)
2728
export(mask_quick)
2829
export(mask_rx)
@@ -42,6 +43,7 @@ export(txt_ul)
4243
export(wrap_html)
4344
import(stringr)
4445
importFrom(glue,glue)
46+
importFrom(knitr,knit_print)
4547
importFrom(magrittr,"%>%")
4648
importFrom(purrr,map)
4749
importFrom(purrr,map2)

R/decorated-print.R

+11
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ decorated <- function(x) {
2121
#' @return "as-is" html output, to be rendered when knitted
2222
#'
2323
#' @importFrom purrr map
24+
#' @importFrom knitr knit_print
2425
#'
26+
#' @method knit_print decorated
2527
#' @export
2628
knit_print.decorated <- function(x, ...) {
2729

@@ -161,3 +163,12 @@ print.decorated <- function(x, ...) {
161163

162164
}
163165

166+
167+
#' Method check
168+
#'
169+
#' @param x An object
170+
#'
171+
#' @return Whether the object is a \code{decorated} class object.
172+
#'
173+
#' @export
174+
is.decorated <- function(x) inherits(x, "decorated")

man/is.decorated.Rd

+17
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/knit_print.decorated.Rd

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)