File: Hooks.Rd

package info (click to toggle)
r-cran-vcr 0.6.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,360 kB
  • sloc: cpp: 15; sh: 13; makefile: 2
file content (115 lines) | stat: -rw-r--r-- 2,925 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/hooks.R
\name{Hooks}
\alias{Hooks}
\title{Hooks class}
\description{
Helps define new hooks, hold hooks, and accessors to get and
use hooks.
}
\details{
\strong{Private Methods}
\describe{
\item{\code{make_hook(x, plac, fun)}}{
Make a hook.
- x (character) Hook name
- plac Placement, one of "start" or "end"
- fun a function/callback
}
}
}
\keyword{internal}
\section{Public fields}{
\if{html}{\out{<div class="r6-fields">}}
\describe{
\item{\code{hooks}}{intenal use}
}
\if{html}{\out{</div>}}
}
\section{Methods}{
\subsection{Public methods}{
\itemize{
\item \href{#method-invoke_hook}{\code{Hooks$invoke_hook()}}
\item \href{#method-clear_hooks}{\code{Hooks$clear_hooks()}}
\item \href{#method-define_hook}{\code{Hooks$define_hook()}}
\item \href{#method-clone}{\code{Hooks$clone()}}
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-invoke_hook"></a>}}
\if{latex}{\out{\hypertarget{method-invoke_hook}{}}}
\subsection{Method \code{invoke_hook()}}{
invoke a hook
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{Hooks$invoke_hook(hook_type, args)}\if{html}{\out{</div>}}
}

\subsection{Arguments}{
\if{html}{\out{<div class="arguments">}}
\describe{
\item{\code{hook_type}}{(character) Hook name}

\item{\code{args}}{(named list) Args passed when invoking a hook}
}
\if{html}{\out{</div>}}
}
\subsection{Returns}{
executes hook
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-clear_hooks"></a>}}
\if{latex}{\out{\hypertarget{method-clear_hooks}{}}}
\subsection{Method \code{clear_hooks()}}{
clear all hooks
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{Hooks$clear_hooks()}\if{html}{\out{</div>}}
}

\subsection{Returns}{
no return
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-define_hook"></a>}}
\if{latex}{\out{\hypertarget{method-define_hook}{}}}
\subsection{Method \code{define_hook()}}{
define a hook
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{Hooks$define_hook(hook_type, fun, prepend = FALSE)}\if{html}{\out{</div>}}
}

\subsection{Arguments}{
\if{html}{\out{<div class="arguments">}}
\describe{
\item{\code{hook_type}}{(character) Hook name}

\item{\code{fun}}{A function}

\item{\code{prepend}}{(logical) Whether to prepend or add to the end
of the string. Default: \code{FALSE}}
}
\if{html}{\out{</div>}}
}
\subsection{Returns}{
no return; defines hook internally
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-clone"></a>}}
\if{latex}{\out{\hypertarget{method-clone}{}}}
\subsection{Method \code{clone()}}{
The objects of this class are cloneable with this method.
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{Hooks$clone(deep = FALSE)}\if{html}{\out{</div>}}
}

\subsection{Arguments}{
\if{html}{\out{<div class="arguments">}}
\describe{
\item{\code{deep}}{Whether to make a deep clone.}
}
\if{html}{\out{</div>}}
}
}
}