Skip to contents

Base class that implements some basic properties for printing to console.

Examples

myPrintable <- R6::R6Class(
  "myPrintable",
  inherit = Printable,
  public = list(
    x = NULL,
    y = NULL,
    print = function() {
      private$printClass()
      private$printLine("x", self$x)
      private$printLine("y", self$y)
      invisible(self)
    }
  )
)

x <- myPrintable$new()
x
#> myPrintable: 
#>    x: NULL 
#>    y: NULL