1% Generated by roxygen2: do not edit by hand
2% Please edit documentation in R/ggproto.r
3\name{print.ggproto}
4\alias{print.ggproto}
5\alias{format.ggproto}
6\title{Format or print a ggproto object}
7\usage{
8\method{print}{ggproto}(x, ..., flat = TRUE)
9
10\method{format}{ggproto}(x, ..., flat = TRUE)
11}
12\arguments{
13\item{x}{A ggproto object to print.}
14
15\item{...}{If the ggproto object has a \code{print} method, further arguments
16will be passed to it. Otherwise, these arguments are unused.}
17
18\item{flat}{If \code{TRUE} (the default), show a flattened list of all local
19and inherited members. If \code{FALSE}, show the inheritance hierarchy.}
20}
21\description{
22If a ggproto object has a \verb{$print} method, this will call that method.
23Otherwise, it will print out the members of the object, and optionally, the
24members of the inherited objects.
25}
26\examples{
27Dog <- ggproto(
28  print = function(self, n) {
29    cat("Woof!\n")
30  }
31 )
32Dog
33cat(format(Dog), "\n")
34}
35