Skip to content

Commit

Permalink
with_flair to decorated
Browse files Browse the repository at this point in the history
  • Loading branch information
kbodwin committed Feb 10, 2021
1 parent ff9e308 commit 20076b7
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 2 deletions.
4 changes: 3 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ S3method(flair_lines,decorated)
S3method(flair_lines,default)
S3method(flair_rx,decorated)
S3method(flair_rx,default)
S3method(knit_print,decorated)
S3method(mask_rx,decorated)
S3method(mask_rx,default)
S3method(print,decorated)
Expand All @@ -22,7 +23,7 @@ export(flair_input_vals)
export(flair_lines)
export(flair_quick)
export(flair_rx)
export(knit_print.decorated)
export(is.decorated)
export(mask)
export(mask_quick)
export(mask_rx)
Expand All @@ -42,6 +43,7 @@ export(txt_ul)
export(wrap_html)
import(stringr)
importFrom(glue,glue)
importFrom(knitr,knit_print)
importFrom(magrittr,"%>%")
importFrom(purrr,map)
importFrom(purrr,map2)
Expand Down
11 changes: 11 additions & 0 deletions R/decorated-print.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ decorated <- function(x) {
#' @return "as-is" html output, to be rendered when knitted
#'
#' @importFrom purrr map
#' @importFrom knitr knit_print
#'
#' @method knit_print decorated
#' @export
knit_print.decorated <- function(x, ...) {

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

}


#' Method check
#'
#' @param x An object
#'
#' @return Whether the object is a \code{decorated} class object.
#'
#' @export
is.decorated <- function(x) inherits(x, "decorated")
17 changes: 17 additions & 0 deletions man/is.decorated.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/knit_print.decorated.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 20076b7

Please sign in to comment.