PageTemplate 2.2.0 → 2.2.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Changes +6 -1
- data/README.txt +2 -2
- data/Rakefile +5 -0
- data/lib/PageTemplate.rb +1 -1
- data/lib/PageTemplate/commands.rb +6 -1
- data/lib/PageTemplate/parser.rb +11 -4
- data/pkg/PageTemplate-2.2.3.gem +0 -0
- data/test.rb +8 -0
- metadata +4 -156
- data/doc/classes/PageTemplate.html +0 -203
- data/doc/classes/PageTemplate.src/M000001.html +0 -18
- data/doc/classes/PageTemplate/BlockCommand.html +0 -230
- data/doc/classes/PageTemplate/BlockCommand.src/M000020.html +0 -18
- data/doc/classes/PageTemplate/BlockCommand.src/M000021.html +0 -18
- data/doc/classes/PageTemplate/BlockCommand.src/M000022.html +0 -18
- data/doc/classes/PageTemplate/BlockCommand.src/M000023.html +0 -21
- data/doc/classes/PageTemplate/BlockCommand.src/M000024.html +0 -18
- data/doc/classes/PageTemplate/CaseCommand.html +0 -252
- data/doc/classes/PageTemplate/CaseCommand.src/M000085.html +0 -22
- data/doc/classes/PageTemplate/CaseCommand.src/M000086.html +0 -22
- data/doc/classes/PageTemplate/CaseCommand.src/M000087.html +0 -19
- data/doc/classes/PageTemplate/CaseCommand.src/M000088.html +0 -19
- data/doc/classes/PageTemplate/CaseCommand.src/M000089.html +0 -23
- data/doc/classes/PageTemplate/CaseCommand.src/M000090.html +0 -23
- data/doc/classes/PageTemplate/Command.html +0 -199
- data/doc/classes/PageTemplate/Command.src/M000045.html +0 -19
- data/doc/classes/PageTemplate/Command.src/M000046.html +0 -18
- data/doc/classes/PageTemplate/CommentCommand.html +0 -187
- data/doc/classes/PageTemplate/CommentCommand.src/M000028.html +0 -18
- data/doc/classes/PageTemplate/CommentCommand.src/M000029.html +0 -18
- data/doc/classes/PageTemplate/CommentCommand.src/M000030.html +0 -18
- data/doc/classes/PageTemplate/DefaultGlossary.html +0 -121
- data/doc/classes/PageTemplate/DefaultPreprocessor.html +0 -232
- data/doc/classes/PageTemplate/DefaultPreprocessor.src/M000074.html +0 -18
- data/doc/classes/PageTemplate/DefaultPreprocessor.src/M000075.html +0 -18
- data/doc/classes/PageTemplate/DefaultPreprocessor.src/M000076.html +0 -20
- data/doc/classes/PageTemplate/DefaultPreprocessor.src/M000077.html +0 -22
- data/doc/classes/PageTemplate/DefaultPreprocessor.src/M000078.html +0 -18
- data/doc/classes/PageTemplate/DefineCommand.html +0 -166
- data/doc/classes/PageTemplate/DefineCommand.src/M000079.html +0 -19
- data/doc/classes/PageTemplate/DefineCommand.src/M000080.html +0 -19
- data/doc/classes/PageTemplate/FileSource.html +0 -222
- data/doc/classes/PageTemplate/FileSource.src/M000016.html +0 -28
- data/doc/classes/PageTemplate/FileSource.src/M000017.html +0 -32
- data/doc/classes/PageTemplate/FileSource.src/M000018.html +0 -20
- data/doc/classes/PageTemplate/FileSource.src/M000019.html +0 -30
- data/doc/classes/PageTemplate/FilterCommand.html +0 -181
- data/doc/classes/PageTemplate/FilterCommand.src/M000065.html +0 -20
- data/doc/classes/PageTemplate/FilterCommand.src/M000066.html +0 -18
- data/doc/classes/PageTemplate/FilterCommand.src/M000067.html +0 -29
- data/doc/classes/PageTemplate/HTGlossary.html +0 -113
- data/doc/classes/PageTemplate/IfCommand.html +0 -261
- data/doc/classes/PageTemplate/IfCommand.src/M000059.html +0 -24
- data/doc/classes/PageTemplate/IfCommand.src/M000060.html +0 -22
- data/doc/classes/PageTemplate/IfCommand.src/M000061.html +0 -19
- data/doc/classes/PageTemplate/IfCommand.src/M000062.html +0 -20
- data/doc/classes/PageTemplate/IfCommand.src/M000063.html +0 -22
- data/doc/classes/PageTemplate/IfCommand.src/M000064.html +0 -36
- data/doc/classes/PageTemplate/IncludeCommand.html +0 -203
- data/doc/classes/PageTemplate/IncludeCommand.src/M000039.html +0 -18
- data/doc/classes/PageTemplate/IncludeCommand.src/M000040.html +0 -18
- data/doc/classes/PageTemplate/IncludeCommand.src/M000041.html +0 -35
- data/doc/classes/PageTemplate/LoopCommand.html +0 -260
- data/doc/classes/PageTemplate/LoopCommand.src/M000011.html +0 -24
- data/doc/classes/PageTemplate/LoopCommand.src/M000012.html +0 -20
- data/doc/classes/PageTemplate/LoopCommand.src/M000013.html +0 -22
- data/doc/classes/PageTemplate/LoopCommand.src/M000014.html +0 -77
- data/doc/classes/PageTemplate/LoopCommand.src/M000015.html +0 -21
- data/doc/classes/PageTemplate/Namespace.html +0 -163
- data/doc/classes/PageTemplate/Namespace.src/M000057.html +0 -20
- data/doc/classes/PageTemplate/Namespace.src/M000058.html +0 -22
- data/doc/classes/PageTemplate/NamespaceItem.html +0 -333
- data/doc/classes/PageTemplate/NamespaceItem.src/M000002.html +0 -18
- data/doc/classes/PageTemplate/NamespaceItem.src/M000004.html +0 -19
- data/doc/classes/PageTemplate/NamespaceItem.src/M000006.html +0 -84
- data/doc/classes/PageTemplate/NamespaceItem.src/M000008.html +0 -18
- data/doc/classes/PageTemplate/NamespaceItem.src/M000009.html +0 -22
- data/doc/classes/PageTemplate/NamespaceItem.src/M000010.html +0 -31
- data/doc/classes/PageTemplate/Parser.html +0 -369
- data/doc/classes/PageTemplate/Parser.src/M000031.html +0 -18
- data/doc/classes/PageTemplate/Parser.src/M000032.html +0 -32
- data/doc/classes/PageTemplate/Parser.src/M000033.html +0 -18
- data/doc/classes/PageTemplate/Parser.src/M000034.html +0 -30
- data/doc/classes/PageTemplate/Parser.src/M000035.html +0 -66
- data/doc/classes/PageTemplate/Parser.src/M000036.html +0 -18
- data/doc/classes/PageTemplate/Parser.src/M000037.html +0 -18
- data/doc/classes/PageTemplate/Parser.src/M000038.html +0 -19
- data/doc/classes/PageTemplate/Preprocessor.html +0 -123
- data/doc/classes/PageTemplate/Source.html +0 -165
- data/doc/classes/PageTemplate/Source.src/M000055.html +0 -18
- data/doc/classes/PageTemplate/Source.src/M000056.html +0 -18
- data/doc/classes/PageTemplate/StackableCommand.html +0 -205
- data/doc/classes/PageTemplate/StackableCommand.src/M000081.html +0 -17
- data/doc/classes/PageTemplate/StackableCommand.src/M000082.html +0 -18
- data/doc/classes/PageTemplate/StackableCommand.src/M000083.html +0 -18
- data/doc/classes/PageTemplate/StackableCommand.src/M000084.html +0 -18
- data/doc/classes/PageTemplate/StringSource.html +0 -163
- data/doc/classes/PageTemplate/StringSource.src/M000053.html +0 -23
- data/doc/classes/PageTemplate/StringSource.src/M000054.html +0 -18
- data/doc/classes/PageTemplate/SyntaxGlossary.html +0 -263
- data/doc/classes/PageTemplate/SyntaxGlossary.src/M000047.html +0 -22
- data/doc/classes/PageTemplate/SyntaxGlossary.src/M000048.html +0 -24
- data/doc/classes/PageTemplate/SyntaxGlossary.src/M000049.html +0 -18
- data/doc/classes/PageTemplate/SyntaxGlossary.src/M000050.html +0 -21
- data/doc/classes/PageTemplate/SyntaxGlossary.src/M000051.html +0 -21
- data/doc/classes/PageTemplate/SyntaxGlossary.src/M000052.html +0 -22
- data/doc/classes/PageTemplate/Template.html +0 -208
- data/doc/classes/PageTemplate/Template.src/M000071.html +0 -19
- data/doc/classes/PageTemplate/Template.src/M000072.html +0 -18
- data/doc/classes/PageTemplate/Template.src/M000073.html +0 -29
- data/doc/classes/PageTemplate/TextCommand.html +0 -185
- data/doc/classes/PageTemplate/TextCommand.src/M000068.html +0 -18
- data/doc/classes/PageTemplate/TextCommand.src/M000069.html +0 -18
- data/doc/classes/PageTemplate/TextCommand.src/M000070.html +0 -18
- data/doc/classes/PageTemplate/UnknownCommand.html +0 -191
- data/doc/classes/PageTemplate/UnknownCommand.src/M000025.html +0 -24
- data/doc/classes/PageTemplate/UnknownCommand.src/M000026.html +0 -18
- data/doc/classes/PageTemplate/UnknownCommand.src/M000027.html +0 -18
- data/doc/classes/PageTemplate/ValueCommand.html +0 -206
- data/doc/classes/PageTemplate/ValueCommand.src/M000042.html +0 -19
- data/doc/classes/PageTemplate/ValueCommand.src/M000043.html +0 -27
- data/doc/classes/PageTemplate/ValueCommand.src/M000044.html +0 -21
- data/doc/created.rid +0 -1
- data/doc/files/README_txt.html +0 -225
- data/doc/files/lib/PageTemplate/case_rb.html +0 -115
- data/doc/files/lib/PageTemplate/commands_rb.html +0 -111
- data/doc/files/lib/PageTemplate/htglossary_rb.html +0 -110
- data/doc/files/lib/PageTemplate/parser_rb.html +0 -111
- data/doc/files/lib/PageTemplate_rb.html +0 -139
- data/doc/fr_class_index.html +0 -52
- data/doc/fr_file_index.html +0 -32
- data/doc/fr_method_index.html +0 -116
- data/doc/index.html +0 -24
- data/doc/rdoc-style.css +0 -208
@@ -1,261 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
-
<head>
|
8
|
-
<title>Class: PageTemplate::IfCommand</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
-
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
-
<script type="text/javascript">
|
13
|
-
// <![CDATA[
|
14
|
-
|
15
|
-
function popupCode( url ) {
|
16
|
-
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
-
}
|
18
|
-
|
19
|
-
function toggleCode( id ) {
|
20
|
-
if ( document.getElementById )
|
21
|
-
elem = document.getElementById( id );
|
22
|
-
else if ( document.all )
|
23
|
-
elem = eval( "document.all." + id );
|
24
|
-
else
|
25
|
-
return false;
|
26
|
-
|
27
|
-
elemStyle = elem.style;
|
28
|
-
|
29
|
-
if ( elemStyle.display != "block" ) {
|
30
|
-
elemStyle.display = "block"
|
31
|
-
} else {
|
32
|
-
elemStyle.display = "none"
|
33
|
-
}
|
34
|
-
|
35
|
-
return true;
|
36
|
-
}
|
37
|
-
|
38
|
-
// Make codeblocks hidden by default
|
39
|
-
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
-
|
41
|
-
// ]]>
|
42
|
-
</script>
|
43
|
-
|
44
|
-
</head>
|
45
|
-
<body>
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
<div id="classHeader">
|
50
|
-
<table class="header-table">
|
51
|
-
<tr class="top-aligned-row">
|
52
|
-
<td><strong>Class</strong></td>
|
53
|
-
<td class="class-name-in-header">PageTemplate::IfCommand</td>
|
54
|
-
</tr>
|
55
|
-
<tr class="top-aligned-row">
|
56
|
-
<td><strong>In:</strong></td>
|
57
|
-
<td>
|
58
|
-
<a href="../../files/lib/PageTemplate/commands_rb.html">
|
59
|
-
lib/PageTemplate/commands.rb
|
60
|
-
</a>
|
61
|
-
<br />
|
62
|
-
</td>
|
63
|
-
</tr>
|
64
|
-
|
65
|
-
<tr class="top-aligned-row">
|
66
|
-
<td><strong>Parent:</strong></td>
|
67
|
-
<td>
|
68
|
-
<a href="StackableCommand.html">
|
69
|
-
StackableCommand
|
70
|
-
</a>
|
71
|
-
</td>
|
72
|
-
</tr>
|
73
|
-
</table>
|
74
|
-
</div>
|
75
|
-
<!-- banner header -->
|
76
|
-
|
77
|
-
<div id="bodyContent">
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
<div id="contextContent">
|
82
|
-
|
83
|
-
<div id="description">
|
84
|
-
<p>
|
85
|
-
<a href="IfCommand.html">IfCommand</a> is a <a
|
86
|
-
href="StackableCommand.html">StackableCommand</a>. It requires an opening:
|
87
|
-
</p>
|
88
|
-
<dl>
|
89
|
-
<dt>% if variable %</dt><dd>or [% unless variable %].
|
90
|
-
|
91
|
-
</dd>
|
92
|
-
</dl>
|
93
|
-
<p>
|
94
|
-
On execution, if <tt>variable</tt> is true, then the contents of <a
|
95
|
-
href="IfCommand.html">IfCommand</a>’s @commands is printed.
|
96
|
-
</p>
|
97
|
-
<dl>
|
98
|
-
<dt>% else %</dt><dd>may be specified for either if or unless, after which
|
99
|
-
|
100
|
-
</dd>
|
101
|
-
</dl>
|
102
|
-
<p>
|
103
|
-
objects are added to @falseCommands, and are printed if <tt>variable</tt>
|
104
|
-
is false, instead.
|
105
|
-
</p>
|
106
|
-
|
107
|
-
</div>
|
108
|
-
|
109
|
-
|
110
|
-
</div>
|
111
|
-
|
112
|
-
<div id="method-list">
|
113
|
-
<h3 class="section-bar">Methods</h3>
|
114
|
-
|
115
|
-
<div class="name-list">
|
116
|
-
<a href="#M000060">add</a>
|
117
|
-
<a href="#M000062">else</a>
|
118
|
-
<a href="#M000061">elsif</a>
|
119
|
-
<a href="#M000059">new</a>
|
120
|
-
<a href="#M000063">output</a>
|
121
|
-
<a href="#M000064">to_s</a>
|
122
|
-
</div>
|
123
|
-
</div>
|
124
|
-
|
125
|
-
</div>
|
126
|
-
|
127
|
-
|
128
|
-
<!-- if includes -->
|
129
|
-
|
130
|
-
<div id="section">
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
<!-- if method_list -->
|
140
|
-
<div id="methods">
|
141
|
-
<h3 class="section-bar">Public Class methods</h3>
|
142
|
-
|
143
|
-
<div id="method-M000059" class="method-detail">
|
144
|
-
<a name="M000059"></a>
|
145
|
-
|
146
|
-
<div class="method-heading">
|
147
|
-
<a href="IfCommand.src/M000059.html" target="Code" class="method-signature"
|
148
|
-
onclick="popupCode('IfCommand.src/M000059.html');return false;">
|
149
|
-
<span class="method-name">new</span><span class="method-args">(called_as, value)</span>
|
150
|
-
</a>
|
151
|
-
</div>
|
152
|
-
|
153
|
-
<div class="method-description">
|
154
|
-
<p>
|
155
|
-
<tt>command</tt> must match "if <value>" or "unless
|
156
|
-
<value>"
|
157
|
-
</p>
|
158
|
-
</div>
|
159
|
-
</div>
|
160
|
-
|
161
|
-
<h3 class="section-bar">Public Instance methods</h3>
|
162
|
-
|
163
|
-
<div id="method-M000060" class="method-detail">
|
164
|
-
<a name="M000060"></a>
|
165
|
-
|
166
|
-
<div class="method-heading">
|
167
|
-
<a href="IfCommand.src/M000060.html" target="Code" class="method-signature"
|
168
|
-
onclick="popupCode('IfCommand.src/M000060.html');return false;">
|
169
|
-
<span class="method-name">add</span><span class="method-args">(command)</span>
|
170
|
-
</a>
|
171
|
-
</div>
|
172
|
-
|
173
|
-
<div class="method-description">
|
174
|
-
<p>
|
175
|
-
Add the command to the @trueCommands or @falseCommands block, depending on
|
176
|
-
if the command is an ‘if’ or ‘unless’ and if
|
177
|
-
‘else’ has been called.
|
178
|
-
</p>
|
179
|
-
</div>
|
180
|
-
</div>
|
181
|
-
|
182
|
-
<div id="method-M000062" class="method-detail">
|
183
|
-
<a name="M000062"></a>
|
184
|
-
|
185
|
-
<div class="method-heading">
|
186
|
-
<a href="IfCommand.src/M000062.html" target="Code" class="method-signature"
|
187
|
-
onclick="popupCode('IfCommand.src/M000062.html');return false;">
|
188
|
-
<span class="method-name">else</span><span class="method-args">()</span>
|
189
|
-
</a>
|
190
|
-
</div>
|
191
|
-
|
192
|
-
<div class="method-description">
|
193
|
-
<p>
|
194
|
-
an ‘else’ will modify the command, switching it from adding to
|
195
|
-
@trueCommands to adding to @falseCommands, or vice versa.
|
196
|
-
</p>
|
197
|
-
</div>
|
198
|
-
</div>
|
199
|
-
|
200
|
-
<div id="method-M000061" class="method-detail">
|
201
|
-
<a name="M000061"></a>
|
202
|
-
|
203
|
-
<div class="method-heading">
|
204
|
-
<a href="IfCommand.src/M000061.html" target="Code" class="method-signature"
|
205
|
-
onclick="popupCode('IfCommand.src/M000061.html');return false;">
|
206
|
-
<span class="method-name">elsif</span><span class="method-args">(value)</span>
|
207
|
-
</a>
|
208
|
-
</div>
|
209
|
-
|
210
|
-
<div class="method-description">
|
211
|
-
<p>
|
212
|
-
an elseif will create a new condition.
|
213
|
-
</p>
|
214
|
-
</div>
|
215
|
-
</div>
|
216
|
-
|
217
|
-
<div id="method-M000063" class="method-detail">
|
218
|
-
<a name="M000063"></a>
|
219
|
-
|
220
|
-
<div class="method-heading">
|
221
|
-
<a href="IfCommand.src/M000063.html" target="Code" class="method-signature"
|
222
|
-
onclick="popupCode('IfCommand.src/M000063.html');return false;">
|
223
|
-
<span class="method-name">output</span><span class="method-args">(namespace=nil)</span>
|
224
|
-
</a>
|
225
|
-
</div>
|
226
|
-
|
227
|
-
<div class="method-description">
|
228
|
-
<p>
|
229
|
-
If @value is true within the context of <tt>namespace</tt>, then print the
|
230
|
-
output of @trueCommands. Otherwise, print the output of @falseCommands
|
231
|
-
</p>
|
232
|
-
</div>
|
233
|
-
</div>
|
234
|
-
|
235
|
-
<div id="method-M000064" class="method-detail">
|
236
|
-
<a name="M000064"></a>
|
237
|
-
|
238
|
-
<div class="method-heading">
|
239
|
-
<a href="IfCommand.src/M000064.html" target="Code" class="method-signature"
|
240
|
-
onclick="popupCode('IfCommand.src/M000064.html');return false;">
|
241
|
-
<span class="method-name">to_s</span><span class="method-args">()</span>
|
242
|
-
</a>
|
243
|
-
</div>
|
244
|
-
|
245
|
-
<div class="method-description">
|
246
|
-
</div>
|
247
|
-
</div>
|
248
|
-
|
249
|
-
|
250
|
-
</div>
|
251
|
-
|
252
|
-
|
253
|
-
</div>
|
254
|
-
|
255
|
-
|
256
|
-
<div id="validator-badges">
|
257
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
258
|
-
</div>
|
259
|
-
|
260
|
-
</body>
|
261
|
-
</html>
|
@@ -1,24 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>new (PageTemplate::IfCommand)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/PageTemplate/commands.rb, line 317</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">called_as</span>, <span class="ruby-identifier">value</span>)
|
15
|
-
<span class="ruby-ivar">@value</span> = <span class="ruby-identifier">value</span>
|
16
|
-
<span class="ruby-ivar">@called_as</span> = <span class="ruby-identifier">called_as</span>
|
17
|
-
<span class="ruby-ivar">@trueCommands</span> = []
|
18
|
-
<span class="ruby-ivar">@trueCommands</span> <span class="ruby-operator"><<</span> [<span class="ruby-identifier">value</span>,<span class="ruby-constant">BlockCommand</span>.<span class="ruby-identifier">new</span>]
|
19
|
-
<span class="ruby-ivar">@falseCommands</span> = <span class="ruby-constant">BlockCommand</span>.<span class="ruby-identifier">new</span>
|
20
|
-
<span class="ruby-ivar">@in_else</span> = (<span class="ruby-identifier">called_as</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'unless'</span>)
|
21
|
-
<span class="ruby-ivar">@switched</span> = <span class="ruby-keyword kw">false</span>
|
22
|
-
<span class="ruby-keyword kw">end</span></pre>
|
23
|
-
</body>
|
24
|
-
</html>
|
@@ -1,22 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>add (PageTemplate::IfCommand)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/PageTemplate/commands.rb, line 329</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add</span>(<span class="ruby-identifier">command</span>)
|
15
|
-
<span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@in_else</span>
|
16
|
-
<span class="ruby-ivar">@trueCommands</span>.<span class="ruby-identifier">last</span>.<span class="ruby-identifier">last</span>.<span class="ruby-identifier">add</span> <span class="ruby-identifier">command</span>
|
17
|
-
<span class="ruby-keyword kw">else</span>
|
18
|
-
<span class="ruby-ivar">@falseCommands</span>.<span class="ruby-identifier">add</span> <span class="ruby-identifier">command</span>
|
19
|
-
<span class="ruby-keyword kw">end</span>
|
20
|
-
<span class="ruby-keyword kw">end</span></pre>
|
21
|
-
</body>
|
22
|
-
</html>
|
@@ -1,19 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>elsif (PageTemplate::IfCommand)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/PageTemplate/commands.rb, line 337</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">elsif</span>(<span class="ruby-identifier">value</span>)
|
15
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-constant">Argumentrror</span>, <span class="ruby-value str">"'elsif' cannot be passed after 'else' or in an 'unless'"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@switched</span> <span class="ruby-operator">||</span> <span class="ruby-ivar">@in_else</span>
|
16
|
-
<span class="ruby-ivar">@trueCommands</span> <span class="ruby-operator"><<</span> [<span class="ruby-identifier">value</span>,<span class="ruby-constant">BlockCommand</span>.<span class="ruby-identifier">new</span>]
|
17
|
-
<span class="ruby-keyword kw">end</span></pre>
|
18
|
-
</body>
|
19
|
-
</html>
|
@@ -1,20 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>else (PageTemplate::IfCommand)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/PageTemplate/commands.rb, line 343</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">else</span>
|
15
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">"More than one 'else' to IfCommand"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@switched</span>
|
16
|
-
<span class="ruby-ivar">@in_else</span> = <span class="ruby-operator">!</span> <span class="ruby-ivar">@in_else</span>
|
17
|
-
<span class="ruby-ivar">@switched</span> = <span class="ruby-keyword kw">true</span>
|
18
|
-
<span class="ruby-keyword kw">end</span></pre>
|
19
|
-
</body>
|
20
|
-
</html>
|
@@ -1,22 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>output (PageTemplate::IfCommand)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/PageTemplate/commands.rb, line 351</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">output</span>(<span class="ruby-identifier">namespace</span>=<span class="ruby-keyword kw">nil</span>)
|
15
|
-
<span class="ruby-identifier">val</span> = <span class="ruby-value str">''</span>
|
16
|
-
<span class="ruby-ivar">@trueCommands</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">val</span>,<span class="ruby-identifier">commands</span><span class="ruby-operator">|</span>
|
17
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">commands</span>.<span class="ruby-identifier">output</span>(<span class="ruby-identifier">namespace</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">namespace</span>.<span class="ruby-identifier">true?</span>(<span class="ruby-identifier">val</span>)
|
18
|
-
<span class="ruby-keyword kw">end</span>
|
19
|
-
<span class="ruby-ivar">@falseCommands</span>.<span class="ruby-identifier">output</span>(<span class="ruby-identifier">namespace</span>)
|
20
|
-
<span class="ruby-keyword kw">end</span></pre>
|
21
|
-
</body>
|
22
|
-
</html>
|
@@ -1,36 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>to_s (PageTemplate::IfCommand)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/PageTemplate/commands.rb, line 358</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span>
|
15
|
-
<span class="ruby-identifier">str</span> = <span class="ruby-value str">'['</span>
|
16
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@called_as</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'if'</span>
|
17
|
-
<span class="ruby-identifier">str</span> = <span class="ruby-value str">' If'</span>
|
18
|
-
<span class="ruby-identifier">label</span> = <span class="ruby-value str">' If'</span>
|
19
|
-
<span class="ruby-identifier">str</span> <span class="ruby-operator">+=</span> <span class="ruby-ivar">@trueCommands</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">val</span>,<span class="ruby-identifier">commands</span><span class="ruby-operator">|</span>
|
20
|
-
<span class="ruby-identifier">s</span> = <span class="ruby-node">"#{label} (#{val}) #{commands}"</span>
|
21
|
-
<span class="ruby-identifier">label</span> = <span class="ruby-value str">' Elsif'</span>
|
22
|
-
}.<span class="ruby-identifier">join</span>(<span class="ruby-value str">''</span>)
|
23
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@falseCommands</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span>
|
24
|
-
<span class="ruby-identifier">str</span> <span class="ruby-operator"><<</span> <span class="ruby-node">" else: #{@falseCommands}"</span>
|
25
|
-
<span class="ruby-keyword kw">end</span>
|
26
|
-
<span class="ruby-keyword kw">else</span>
|
27
|
-
<span class="ruby-identifier">str</span> = <span class="ruby-node">"[ Unless (#{@value}): #{@falseCommands}"</span>
|
28
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@trueCommands</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span>
|
29
|
-
<span class="ruby-identifier">str</span> <span class="ruby-operator"><<</span> <span class="ruby-node">" else: #{@trueCommands}"</span>
|
30
|
-
<span class="ruby-keyword kw">end</span>
|
31
|
-
<span class="ruby-keyword kw">end</span>
|
32
|
-
<span class="ruby-identifier">str</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">' ]'</span>
|
33
|
-
<span class="ruby-identifier">str</span>
|
34
|
-
<span class="ruby-keyword kw">end</span></pre>
|
35
|
-
</body>
|
36
|
-
</html>
|
@@ -1,203 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
-
<head>
|
8
|
-
<title>Class: PageTemplate::IncludeCommand</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
-
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
-
<script type="text/javascript">
|
13
|
-
// <![CDATA[
|
14
|
-
|
15
|
-
function popupCode( url ) {
|
16
|
-
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
-
}
|
18
|
-
|
19
|
-
function toggleCode( id ) {
|
20
|
-
if ( document.getElementById )
|
21
|
-
elem = document.getElementById( id );
|
22
|
-
else if ( document.all )
|
23
|
-
elem = eval( "document.all." + id );
|
24
|
-
else
|
25
|
-
return false;
|
26
|
-
|
27
|
-
elemStyle = elem.style;
|
28
|
-
|
29
|
-
if ( elemStyle.display != "block" ) {
|
30
|
-
elemStyle.display = "block"
|
31
|
-
} else {
|
32
|
-
elemStyle.display = "none"
|
33
|
-
}
|
34
|
-
|
35
|
-
return true;
|
36
|
-
}
|
37
|
-
|
38
|
-
// Make codeblocks hidden by default
|
39
|
-
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
-
|
41
|
-
// ]]>
|
42
|
-
</script>
|
43
|
-
|
44
|
-
</head>
|
45
|
-
<body>
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
<div id="classHeader">
|
50
|
-
<table class="header-table">
|
51
|
-
<tr class="top-aligned-row">
|
52
|
-
<td><strong>Class</strong></td>
|
53
|
-
<td class="class-name-in-header">PageTemplate::IncludeCommand</td>
|
54
|
-
</tr>
|
55
|
-
<tr class="top-aligned-row">
|
56
|
-
<td><strong>In:</strong></td>
|
57
|
-
<td>
|
58
|
-
<a href="../../files/lib/PageTemplate/commands_rb.html">
|
59
|
-
lib/PageTemplate/commands.rb
|
60
|
-
</a>
|
61
|
-
<br />
|
62
|
-
</td>
|
63
|
-
</tr>
|
64
|
-
|
65
|
-
<tr class="top-aligned-row">
|
66
|
-
<td><strong>Parent:</strong></td>
|
67
|
-
<td>
|
68
|
-
<a href="Command.html">
|
69
|
-
Command
|
70
|
-
</a>
|
71
|
-
</td>
|
72
|
-
</tr>
|
73
|
-
</table>
|
74
|
-
</div>
|
75
|
-
<!-- banner header -->
|
76
|
-
|
77
|
-
<div id="bodyContent">
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
<div id="contextContent">
|
82
|
-
|
83
|
-
<div id="description">
|
84
|
-
<p>
|
85
|
-
<a href="IncludeCommand.html">IncludeCommand</a> allows the designer to
|
86
|
-
include a template from another source.
|
87
|
-
</p>
|
88
|
-
<dl>
|
89
|
-
<dt>% include variable %</dt><dd>or [% include literal %]
|
90
|
-
|
91
|
-
</dd>
|
92
|
-
</dl>
|
93
|
-
<p>
|
94
|
-
If <tt>literal</tt> exists in parser.source, then it is called without
|
95
|
-
passing it to its namespace. If it does not exist, then it is evaluated
|
96
|
-
within the context of its namespace and then passed to parser.source for
|
97
|
-
fetching the body of the file/source.
|
98
|
-
</p>
|
99
|
-
<p>
|
100
|
-
The body returned by the <a href="Source.html">Source</a> is then passed to
|
101
|
-
<a href="Parser.html">Parser</a> for compilation.
|
102
|
-
</p>
|
103
|
-
|
104
|
-
</div>
|
105
|
-
|
106
|
-
|
107
|
-
</div>
|
108
|
-
|
109
|
-
<div id="method-list">
|
110
|
-
<h3 class="section-bar">Methods</h3>
|
111
|
-
|
112
|
-
<div class="name-list">
|
113
|
-
<a href="#M000039">new</a>
|
114
|
-
<a href="#M000041">output</a>
|
115
|
-
<a href="#M000040">to_s</a>
|
116
|
-
</div>
|
117
|
-
</div>
|
118
|
-
|
119
|
-
</div>
|
120
|
-
|
121
|
-
|
122
|
-
<!-- if includes -->
|
123
|
-
|
124
|
-
<div id="section">
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
<!-- if method_list -->
|
134
|
-
<div id="methods">
|
135
|
-
<h3 class="section-bar">Public Class methods</h3>
|
136
|
-
|
137
|
-
<div id="method-M000039" class="method-detail">
|
138
|
-
<a name="M000039"></a>
|
139
|
-
|
140
|
-
<div class="method-heading">
|
141
|
-
<a href="IncludeCommand.src/M000039.html" target="Code" class="method-signature"
|
142
|
-
onclick="popupCode('IncludeCommand.src/M000039.html');return false;">
|
143
|
-
<span class="method-name">new</span><span class="method-args">(value)</span>
|
144
|
-
</a>
|
145
|
-
</div>
|
146
|
-
|
147
|
-
<div class="method-description">
|
148
|
-
</div>
|
149
|
-
</div>
|
150
|
-
|
151
|
-
<h3 class="section-bar">Public Instance methods</h3>
|
152
|
-
|
153
|
-
<div id="method-M000041" class="method-detail">
|
154
|
-
<a name="M000041"></a>
|
155
|
-
|
156
|
-
<div class="method-heading">
|
157
|
-
<a href="IncludeCommand.src/M000041.html" target="Code" class="method-signature"
|
158
|
-
onclick="popupCode('IncludeCommand.src/M000041.html');return false;">
|
159
|
-
<span class="method-name">output</span><span class="method-args">(namespace)</span>
|
160
|
-
</a>
|
161
|
-
</div>
|
162
|
-
|
163
|
-
<div class="method-description">
|
164
|
-
<p>
|
165
|
-
If @value exists in parser.source, then it is called without passing it to
|
166
|
-
its namespace. If it does not exist, then it is evaluated within the
|
167
|
-
context of its namespace and then passed to parser.source for fetching the
|
168
|
-
body of the file/source.
|
169
|
-
</p>
|
170
|
-
<p>
|
171
|
-
The body returned by the <a href="Source.html">Source</a> is then passed to
|
172
|
-
<a href="Parser.html">Parser</a> for compilation.
|
173
|
-
</p>
|
174
|
-
</div>
|
175
|
-
</div>
|
176
|
-
|
177
|
-
<div id="method-M000040" class="method-detail">
|
178
|
-
<a name="M000040"></a>
|
179
|
-
|
180
|
-
<div class="method-heading">
|
181
|
-
<a href="IncludeCommand.src/M000040.html" target="Code" class="method-signature"
|
182
|
-
onclick="popupCode('IncludeCommand.src/M000040.html');return false;">
|
183
|
-
<span class="method-name">to_s</span><span class="method-args">()</span>
|
184
|
-
</a>
|
185
|
-
</div>
|
186
|
-
|
187
|
-
<div class="method-description">
|
188
|
-
</div>
|
189
|
-
</div>
|
190
|
-
|
191
|
-
|
192
|
-
</div>
|
193
|
-
|
194
|
-
|
195
|
-
</div>
|
196
|
-
|
197
|
-
|
198
|
-
<div id="validator-badges">
|
199
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
200
|
-
</div>
|
201
|
-
|
202
|
-
</body>
|
203
|
-
</html>
|