% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ggproto.R
\name{print.ggproto}
\alias{print.ggproto}
\alias{format.ggproto}
\title{Format or print a ggproto object}
\usage{
\method{print}{ggproto}(x, ..., flat = TRUE)

\method{format}{ggproto}(x, ..., flat = TRUE)
}
\arguments{
\item{x}{A ggproto object to print.}

\item{...}{If the ggproto object has a \code{print} method, further arguments
will be passed to it. Otherwise, these arguments are unused.}

\item{flat}{If \code{TRUE} (the default), show a flattened list of all local
and inherited members. If \code{FALSE}, show the inheritance hierarchy.}
}
\description{
If a ggproto object has a \verb{$print} method, this will call that method.
Otherwise, it will print out the members of the object, and optionally, the
members of the inherited objects.
}
\examples{
Dog <- ggproto(
  print = function(self, n) {
    cat("Woof!\n")
  }
 )
Dog
cat(format(Dog), "\n")
}
