PageTemplate 2.1.7 → 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (134) hide show
  1. data/Changes +15 -0
  2. data/doc/classes/PageTemplate.html +203 -0
  3. data/doc/classes/PageTemplate.src/M000001.html +18 -0
  4. data/doc/classes/PageTemplate/BlockCommand.html +230 -0
  5. data/doc/classes/PageTemplate/BlockCommand.src/M000020.html +18 -0
  6. data/doc/classes/PageTemplate/BlockCommand.src/M000021.html +18 -0
  7. data/doc/classes/PageTemplate/BlockCommand.src/M000022.html +18 -0
  8. data/doc/classes/PageTemplate/BlockCommand.src/M000023.html +21 -0
  9. data/doc/classes/PageTemplate/BlockCommand.src/M000024.html +18 -0
  10. data/doc/classes/PageTemplate/CaseCommand.html +252 -0
  11. data/doc/classes/PageTemplate/CaseCommand.src/M000085.html +22 -0
  12. data/doc/classes/PageTemplate/CaseCommand.src/M000086.html +22 -0
  13. data/doc/classes/PageTemplate/CaseCommand.src/M000087.html +19 -0
  14. data/doc/classes/PageTemplate/CaseCommand.src/M000088.html +19 -0
  15. data/doc/classes/PageTemplate/CaseCommand.src/M000089.html +23 -0
  16. data/doc/classes/PageTemplate/CaseCommand.src/M000090.html +23 -0
  17. data/doc/classes/PageTemplate/Command.html +199 -0
  18. data/doc/classes/PageTemplate/Command.src/M000045.html +19 -0
  19. data/doc/classes/PageTemplate/Command.src/M000046.html +18 -0
  20. data/doc/classes/PageTemplate/CommentCommand.html +187 -0
  21. data/doc/classes/PageTemplate/CommentCommand.src/M000028.html +18 -0
  22. data/doc/classes/PageTemplate/CommentCommand.src/M000029.html +18 -0
  23. data/doc/classes/PageTemplate/CommentCommand.src/M000030.html +18 -0
  24. data/doc/classes/PageTemplate/DefaultGlossary.html +121 -0
  25. data/doc/classes/PageTemplate/DefaultPreprocessor.html +232 -0
  26. data/doc/classes/PageTemplate/DefaultPreprocessor.src/M000074.html +18 -0
  27. data/doc/classes/PageTemplate/DefaultPreprocessor.src/M000075.html +18 -0
  28. data/doc/classes/PageTemplate/DefaultPreprocessor.src/M000076.html +20 -0
  29. data/doc/classes/PageTemplate/DefaultPreprocessor.src/M000077.html +22 -0
  30. data/doc/classes/PageTemplate/DefaultPreprocessor.src/M000078.html +18 -0
  31. data/doc/classes/PageTemplate/DefineCommand.html +166 -0
  32. data/doc/classes/PageTemplate/DefineCommand.src/M000079.html +19 -0
  33. data/doc/classes/PageTemplate/DefineCommand.src/M000080.html +19 -0
  34. data/doc/classes/PageTemplate/FileSource.html +222 -0
  35. data/doc/classes/PageTemplate/FileSource.src/M000016.html +28 -0
  36. data/doc/classes/PageTemplate/FileSource.src/M000017.html +32 -0
  37. data/doc/classes/PageTemplate/FileSource.src/M000018.html +20 -0
  38. data/doc/classes/PageTemplate/FileSource.src/M000019.html +30 -0
  39. data/doc/classes/PageTemplate/FilterCommand.html +181 -0
  40. data/doc/classes/PageTemplate/FilterCommand.src/M000065.html +20 -0
  41. data/doc/classes/PageTemplate/FilterCommand.src/M000066.html +18 -0
  42. data/doc/classes/PageTemplate/FilterCommand.src/M000067.html +29 -0
  43. data/doc/classes/PageTemplate/HTGlossary.html +113 -0
  44. data/doc/classes/PageTemplate/IfCommand.html +261 -0
  45. data/doc/classes/PageTemplate/IfCommand.src/M000059.html +24 -0
  46. data/doc/classes/PageTemplate/IfCommand.src/M000060.html +22 -0
  47. data/doc/classes/PageTemplate/IfCommand.src/M000061.html +19 -0
  48. data/doc/classes/PageTemplate/IfCommand.src/M000062.html +20 -0
  49. data/doc/classes/PageTemplate/IfCommand.src/M000063.html +22 -0
  50. data/doc/classes/PageTemplate/IfCommand.src/M000064.html +36 -0
  51. data/doc/classes/PageTemplate/IncludeCommand.html +203 -0
  52. data/doc/classes/PageTemplate/IncludeCommand.src/M000039.html +18 -0
  53. data/doc/classes/PageTemplate/IncludeCommand.src/M000040.html +18 -0
  54. data/doc/classes/PageTemplate/IncludeCommand.src/M000041.html +35 -0
  55. data/doc/classes/PageTemplate/LoopCommand.html +260 -0
  56. data/doc/classes/PageTemplate/LoopCommand.src/M000011.html +24 -0
  57. data/doc/classes/PageTemplate/LoopCommand.src/M000012.html +20 -0
  58. data/doc/classes/PageTemplate/LoopCommand.src/M000013.html +22 -0
  59. data/doc/classes/PageTemplate/LoopCommand.src/M000014.html +77 -0
  60. data/doc/classes/PageTemplate/LoopCommand.src/M000015.html +21 -0
  61. data/doc/classes/PageTemplate/Namespace.html +163 -0
  62. data/doc/classes/PageTemplate/Namespace.src/M000057.html +20 -0
  63. data/doc/classes/PageTemplate/Namespace.src/M000058.html +22 -0
  64. data/doc/classes/PageTemplate/NamespaceItem.html +333 -0
  65. data/doc/classes/PageTemplate/NamespaceItem.src/M000002.html +18 -0
  66. data/doc/classes/PageTemplate/NamespaceItem.src/M000004.html +19 -0
  67. data/doc/classes/PageTemplate/NamespaceItem.src/M000006.html +84 -0
  68. data/doc/classes/PageTemplate/NamespaceItem.src/M000008.html +18 -0
  69. data/doc/classes/PageTemplate/NamespaceItem.src/M000009.html +22 -0
  70. data/doc/classes/PageTemplate/NamespaceItem.src/M000010.html +31 -0
  71. data/doc/classes/PageTemplate/Parser.html +369 -0
  72. data/doc/classes/PageTemplate/Parser.src/M000031.html +18 -0
  73. data/doc/classes/PageTemplate/Parser.src/M000032.html +32 -0
  74. data/doc/classes/PageTemplate/Parser.src/M000033.html +18 -0
  75. data/doc/classes/PageTemplate/Parser.src/M000034.html +30 -0
  76. data/doc/classes/PageTemplate/Parser.src/M000035.html +66 -0
  77. data/doc/classes/PageTemplate/Parser.src/M000036.html +18 -0
  78. data/doc/classes/PageTemplate/Parser.src/M000037.html +18 -0
  79. data/doc/classes/PageTemplate/Parser.src/M000038.html +19 -0
  80. data/doc/classes/PageTemplate/Preprocessor.html +123 -0
  81. data/doc/classes/PageTemplate/Source.html +165 -0
  82. data/doc/classes/PageTemplate/Source.src/M000055.html +18 -0
  83. data/doc/classes/PageTemplate/Source.src/M000056.html +18 -0
  84. data/doc/classes/PageTemplate/StackableCommand.html +205 -0
  85. data/doc/classes/PageTemplate/StackableCommand.src/M000081.html +17 -0
  86. data/doc/classes/PageTemplate/StackableCommand.src/M000082.html +18 -0
  87. data/doc/classes/PageTemplate/StackableCommand.src/M000083.html +18 -0
  88. data/doc/classes/PageTemplate/StackableCommand.src/M000084.html +18 -0
  89. data/doc/classes/PageTemplate/StringSource.html +163 -0
  90. data/doc/classes/PageTemplate/StringSource.src/M000053.html +23 -0
  91. data/doc/classes/PageTemplate/StringSource.src/M000054.html +18 -0
  92. data/doc/classes/PageTemplate/SyntaxGlossary.html +263 -0
  93. data/doc/classes/PageTemplate/SyntaxGlossary.src/M000047.html +22 -0
  94. data/doc/classes/PageTemplate/SyntaxGlossary.src/M000048.html +24 -0
  95. data/doc/classes/PageTemplate/SyntaxGlossary.src/M000049.html +18 -0
  96. data/doc/classes/PageTemplate/SyntaxGlossary.src/M000050.html +21 -0
  97. data/doc/classes/PageTemplate/SyntaxGlossary.src/M000051.html +21 -0
  98. data/doc/classes/PageTemplate/SyntaxGlossary.src/M000052.html +22 -0
  99. data/doc/classes/PageTemplate/Template.html +208 -0
  100. data/doc/classes/PageTemplate/Template.src/M000071.html +19 -0
  101. data/doc/classes/PageTemplate/Template.src/M000072.html +18 -0
  102. data/doc/classes/PageTemplate/Template.src/M000073.html +29 -0
  103. data/doc/classes/PageTemplate/TextCommand.html +185 -0
  104. data/doc/classes/PageTemplate/TextCommand.src/M000068.html +18 -0
  105. data/doc/classes/PageTemplate/TextCommand.src/M000069.html +18 -0
  106. data/doc/classes/PageTemplate/TextCommand.src/M000070.html +18 -0
  107. data/doc/classes/PageTemplate/UnknownCommand.html +191 -0
  108. data/doc/classes/PageTemplate/UnknownCommand.src/M000025.html +24 -0
  109. data/doc/classes/PageTemplate/UnknownCommand.src/M000026.html +18 -0
  110. data/doc/classes/PageTemplate/UnknownCommand.src/M000027.html +18 -0
  111. data/doc/classes/PageTemplate/ValueCommand.html +206 -0
  112. data/doc/classes/PageTemplate/ValueCommand.src/M000042.html +19 -0
  113. data/doc/classes/PageTemplate/ValueCommand.src/M000043.html +27 -0
  114. data/doc/classes/PageTemplate/ValueCommand.src/M000044.html +21 -0
  115. data/doc/created.rid +1 -0
  116. data/doc/files/README_txt.html +225 -0
  117. data/doc/files/lib/PageTemplate/case_rb.html +115 -0
  118. data/doc/files/lib/PageTemplate/commands_rb.html +111 -0
  119. data/doc/files/lib/PageTemplate/htglossary_rb.html +110 -0
  120. data/doc/files/lib/PageTemplate/parser_rb.html +111 -0
  121. data/doc/files/lib/PageTemplate_rb.html +139 -0
  122. data/doc/fr_class_index.html +52 -0
  123. data/doc/fr_file_index.html +32 -0
  124. data/doc/fr_method_index.html +116 -0
  125. data/doc/index.html +24 -0
  126. data/doc/rdoc-style.css +208 -0
  127. data/lib/PageTemplate.rb +1 -1
  128. data/lib/PageTemplate/commands.rb +49 -5
  129. data/lib/PageTemplate/parser.rb +57 -10
  130. data/tdata/include.txt +3 -0
  131. data/tdata/include2.txt +3 -0
  132. data/tdata/variable.txt +1 -0
  133. data/test.rb +83 -6
  134. metadata +159 -2
@@ -0,0 +1,23 @@
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::StringSource)</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/parser.rb, line 198</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">args</span>)
15
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">class</span> <span class="ruby-operator">==</span> <span class="ruby-constant">String</span>
16
+ <span class="ruby-ivar">@source</span> = <span class="ruby-identifier">args</span>
17
+ <span class="ruby-keyword kw">else</span>
18
+ <span class="ruby-ivar">@args</span> = <span class="ruby-identifier">args</span>
19
+ <span class="ruby-ivar">@source</span> = <span class="ruby-identifier">args</span>[<span class="ruby-value str">&quot;source&quot;</span>]
20
+ <span class="ruby-keyword kw">end</span>
21
+ <span class="ruby-keyword kw">end</span></pre>
22
+ </body>
23
+ </html>
@@ -0,0 +1,18 @@
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>get (PageTemplate::StringSource)</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/parser.rb, line 206</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get</span>()
15
+ <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@source</span>
16
+ <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -0,0 +1,263 @@
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::SyntaxGlossary</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::SyntaxGlossary</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/lib/PageTemplate/parser_rb.html">
59
+ lib/PageTemplate/parser.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
+ Object
69
+ </td>
70
+ </tr>
71
+ </table>
72
+ </div>
73
+ <!-- banner header -->
74
+
75
+ <div id="bodyContent">
76
+
77
+
78
+
79
+ <div id="contextContent">
80
+
81
+ <div id="description">
82
+ <p>
83
+ This is the dictionary of commands and the directive that <a
84
+ href="Parser.html">Parser</a> uses to compile a template into a tree of
85
+ commands.
86
+ </p>
87
+ <p>
88
+ directive is the general format of a <a
89
+ href="../PageTemplate.html">PageTemplate</a> command. Default:
90
+ /\[%(.+?)%\]/m
91
+ </p>
92
+ <p>
93
+ @glossary is a hash table of regexp-&gt;<a href="Command.html">Command</a>
94
+ objects. These regexps should not contain <a
95
+ href="../PageTemplate.html">PageTemplate</a> command text. i.e: /var \w+/i
96
+ should be used instead of /[% var %]/
97
+ </p>
98
+
99
+ </div>
100
+
101
+
102
+ </div>
103
+
104
+ <div id="method-list">
105
+ <h3 class="section-bar">Methods</h3>
106
+
107
+ <div class="name-list">
108
+ <a href="#M000047">default</a>&nbsp;&nbsp;
109
+ <a href="#M000050">define</a>&nbsp;&nbsp;
110
+ <a href="#M000052">define_global_var</a>&nbsp;&nbsp;
111
+ <a href="#M000048">lookup</a>&nbsp;&nbsp;
112
+ <a href="#M000051">modifier</a>&nbsp;&nbsp;
113
+ <a href="#M000049">modifies?</a>&nbsp;&nbsp;
114
+ </div>
115
+ </div>
116
+
117
+ </div>
118
+
119
+
120
+ <!-- if includes -->
121
+
122
+ <div id="section">
123
+
124
+
125
+
126
+
127
+
128
+ <div id="attribute-list">
129
+ <h3 class="section-bar">Attributes</h3>
130
+
131
+ <div class="name-list">
132
+ <table>
133
+ <tr class="top-aligned-row context-row">
134
+ <td class="context-item-name">default</td>
135
+ <td class="context-item-value">&nbsp;[W]&nbsp;</td>
136
+ <td class="context-item-desc"></td>
137
+ </tr>
138
+ <tr class="top-aligned-row context-row">
139
+ <td class="context-item-name">directive</td>
140
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
141
+ <td class="context-item-desc"></td>
142
+ </tr>
143
+ </table>
144
+ </div>
145
+ </div>
146
+
147
+
148
+
149
+ <!-- if method_list -->
150
+ <div id="methods">
151
+ <h3 class="section-bar">Public Class methods</h3>
152
+
153
+ <div id="method-M000047" class="method-detail">
154
+ <a name="M000047"></a>
155
+
156
+ <div class="method-heading">
157
+ <a href="SyntaxGlossary.src/M000047.html" target="Code" class="method-signature"
158
+ onclick="popupCode('SyntaxGlossary.src/M000047.html');return false;">
159
+ <span class="method-name">default</span><span class="method-args">(&amp;block)</span>
160
+ </a>
161
+ </div>
162
+
163
+ <div class="method-description">
164
+ </div>
165
+ </div>
166
+
167
+ <div id="method-M000050" class="method-detail">
168
+ <a name="M000050"></a>
169
+
170
+ <div class="method-heading">
171
+ <a href="SyntaxGlossary.src/M000050.html" target="Code" class="method-signature"
172
+ onclick="popupCode('SyntaxGlossary.src/M000050.html');return false;">
173
+ <span class="method-name">define</span><span class="method-args">(rx,&amp;block)</span>
174
+ </a>
175
+ </div>
176
+
177
+ <div class="method-description">
178
+ <p>
179
+ Define a regexp -&gt; <a href="Command.html">Command</a> mapping.
180
+ <tt>rx</tt> is inserted in the lookup table as a key for <tt>command</tt>
181
+ </p>
182
+ </div>
183
+ </div>
184
+
185
+ <div id="method-M000052" class="method-detail">
186
+ <a name="M000052"></a>
187
+
188
+ <div class="method-heading">
189
+ <a href="SyntaxGlossary.src/M000052.html" target="Code" class="method-signature"
190
+ onclick="popupCode('SyntaxGlossary.src/M000052.html');return false;">
191
+ <span class="method-name">define_global_var</span><span class="method-args">(rx)</span>
192
+ </a>
193
+ </div>
194
+
195
+ <div class="method-description">
196
+ <p>
197
+ This is shorthand for define(<tt>key</tt>,Valuecommand), and also allows
198
+ <tt>key</tt> to be a string, converting it to a regexp before adding it to
199
+ the dictionary.
200
+ </p>
201
+ </div>
202
+ </div>
203
+
204
+ <div id="method-M000048" class="method-detail">
205
+ <a name="M000048"></a>
206
+
207
+ <div class="method-heading">
208
+ <a href="SyntaxGlossary.src/M000048.html" target="Code" class="method-signature"
209
+ onclick="popupCode('SyntaxGlossary.src/M000048.html');return false;">
210
+ <span class="method-name">lookup</span><span class="method-args">(command)</span>
211
+ </a>
212
+ </div>
213
+
214
+ <div class="method-description">
215
+ <p>
216
+ Look up <tt>command</tt> to see if it matches a command within the lookup
217
+ table, returning the instance of the command for it, or an <a
218
+ href="UnknownCommand.html">UnknownCommand</a> if none match.
219
+ </p>
220
+ </div>
221
+ </div>
222
+
223
+ <div id="method-M000051" class="method-detail">
224
+ <a name="M000051"></a>
225
+
226
+ <div class="method-heading">
227
+ <a href="SyntaxGlossary.src/M000051.html" target="Code" class="method-signature"
228
+ onclick="popupCode('SyntaxGlossary.src/M000051.html');return false;">
229
+ <span class="method-name">modifier</span><span class="method-args">(sym,&amp;block)</span>
230
+ </a>
231
+ </div>
232
+
233
+ <div class="method-description">
234
+ </div>
235
+ </div>
236
+
237
+ <div id="method-M000049" class="method-detail">
238
+ <a name="M000049"></a>
239
+
240
+ <div class="method-heading">
241
+ <a href="SyntaxGlossary.src/M000049.html" target="Code" class="method-signature"
242
+ onclick="popupCode('SyntaxGlossary.src/M000049.html');return false;">
243
+ <span class="method-name">modifies?</span><span class="method-args">(modifier,cmd,command)</span>
244
+ </a>
245
+ </div>
246
+
247
+ <div class="method-description">
248
+ </div>
249
+ </div>
250
+
251
+
252
+ </div>
253
+
254
+
255
+ </div>
256
+
257
+
258
+ <div id="validator-badges">
259
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
260
+ </div>
261
+
262
+ </body>
263
+ </html>
@@ -0,0 +1,22 @@
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>default (PageTemplate::SyntaxGlossary)</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/parser.rb, line 291</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">default</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
15
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>
16
+ <span class="ruby-ivar">@default</span> = <span class="ruby-identifier">block</span>
17
+ <span class="ruby-keyword kw">else</span>
18
+ <span class="ruby-ivar">@default</span>
19
+ <span class="ruby-keyword kw">end</span>
20
+ <span class="ruby-keyword kw">end</span></pre>
21
+ </body>
22
+ </html>
@@ -0,0 +1,24 @@
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>lookup (PageTemplate::SyntaxGlossary)</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/parser.rb, line 302</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">lookup</span>(<span class="ruby-identifier">command</span>)
15
+ <span class="ruby-ivar">@glossary</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">key</span>,<span class="ruby-identifier">val</span><span class="ruby-operator">|</span>
16
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">m</span> = <span class="ruby-identifier">key</span>.<span class="ruby-identifier">match</span>(<span class="ruby-identifier">command</span>)
17
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">val</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">m</span>)
18
+ <span class="ruby-keyword kw">end</span>
19
+ <span class="ruby-keyword kw">end</span>
20
+
21
+ <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@default</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">command</span>)
22
+ <span class="ruby-keyword kw">end</span></pre>
23
+ </body>
24
+ </html>
@@ -0,0 +1,18 @@
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>modifies? (PageTemplate::SyntaxGlossary)</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/parser.rb, line 311</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">modifies?</span>(<span class="ruby-identifier">modifier</span>,<span class="ruby-identifier">cmd</span>,<span class="ruby-identifier">command</span>)
15
+ <span class="ruby-ivar">@modifiers</span>[<span class="ruby-identifier">modifier</span>].<span class="ruby-identifier">call</span>(<span class="ruby-identifier">cmd</span>,<span class="ruby-identifier">command</span>)
16
+ <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -0,0 +1,21 @@
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>define (PageTemplate::SyntaxGlossary)</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/parser.rb, line 317</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">define</span>(<span class="ruby-identifier">rx</span>,<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
15
+ <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">'First argument to define must be a Regexp'</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">rx</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Regexp</span>)
16
+ <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">'Block expected'</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">block</span>
17
+ <span class="ruby-ivar">@glossary</span> <span class="ruby-operator">||=</span> {}
18
+ <span class="ruby-ivar">@glossary</span>[<span class="ruby-identifier">rx</span>] = <span class="ruby-identifier">block</span>
19
+ <span class="ruby-keyword kw">end</span></pre>
20
+ </body>
21
+ </html>
@@ -0,0 +1,21 @@
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>modifier (PageTemplate::SyntaxGlossary)</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/parser.rb, line 324</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">modifier</span>(<span class="ruby-identifier">sym</span>,<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
15
+ <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">'First argument to define must be a Symbol'</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">sym</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Symbol</span>)
16
+ <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">'Block expected'</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">block</span>
17
+ <span class="ruby-ivar">@modifiers</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">lambda</span> { <span class="ruby-keyword kw">false</span> })
18
+ <span class="ruby-ivar">@modifiers</span>[<span class="ruby-identifier">sym</span>] = <span class="ruby-identifier">block</span>
19
+ <span class="ruby-keyword kw">end</span></pre>
20
+ </body>
21
+ </html>
@@ -0,0 +1,22 @@
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>define_global_var (PageTemplate::SyntaxGlossary)</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/parser.rb, line 334</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">define_global_var</span>(<span class="ruby-identifier">rx</span>)
15
+ <span class="ruby-ivar">@glossary</span> <span class="ruby-operator">||=</span> {}
16
+ <span class="ruby-identifier">rx</span> = <span class="ruby-node">/^(#{key.to_s}(?:\.\w+\??)*)(?:\s:(\w+))?$/</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">rx</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Regexp</span>)
17
+ <span class="ruby-ivar">@glossary</span>[<span class="ruby-identifier">rx</span>] = <span class="ruby-identifier">lambda</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">match</span><span class="ruby-operator">|</span>
18
+ <span class="ruby-constant">ValueCommand</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">match</span>[<span class="ruby-value">1</span>],<span class="ruby-identifier">match</span>[<span class="ruby-value">2</span>])
19
+ }
20
+ <span class="ruby-keyword kw">end</span></pre>
21
+ </body>
22
+ </html>
@@ -0,0 +1,208 @@
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::Template</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::Template</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="BlockCommand.html">
69
+ BlockCommand
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="Template.html">Template</a> is the top-level blockcommand object
86
+ It is what is returned on Template.load() or Template.parse()
87
+ </p>
88
+ <p>
89
+ <a href="Template.html">Template</a> should only be called by the <a
90
+ href="Parser.html">Parser</a>, and never by anything else.
91
+ </p>
92
+
93
+ </div>
94
+
95
+
96
+ </div>
97
+
98
+ <div id="method-list">
99
+ <h3 class="section-bar">Methods</h3>
100
+
101
+ <div class="name-list">
102
+ <a href="#M000071">new</a>&nbsp;&nbsp;
103
+ <a href="#M000073">output</a>&nbsp;&nbsp;
104
+ <a href="#M000072">to_s</a>&nbsp;&nbsp;
105
+ </div>
106
+ </div>
107
+
108
+ </div>
109
+
110
+
111
+ <!-- if includes -->
112
+ <div id="includes">
113
+ <h3 class="section-bar">Included Modules</h3>
114
+
115
+ <div id="includes-list">
116
+ <span class="include-name"><a href="NamespaceItem.html">NamespaceItem</a></span>
117
+ </div>
118
+ </div>
119
+
120
+ <div id="section">
121
+
122
+
123
+
124
+
125
+
126
+
127
+
128
+
129
+ <!-- if method_list -->
130
+ <div id="methods">
131
+ <h3 class="section-bar">Public Class methods</h3>
132
+
133
+ <div id="method-M000071" class="method-detail">
134
+ <a name="M000071"></a>
135
+
136
+ <div class="method-heading">
137
+ <a href="Template.src/M000071.html" target="Code" class="method-signature"
138
+ onclick="popupCode('Template.src/M000071.html');return false;">
139
+ <span class="method-name">new</span><span class="method-args">(parser)</span>
140
+ </a>
141
+ </div>
142
+
143
+ <div class="method-description">
144
+ <p>
145
+ <a href="Template.html">Template</a> must know about the parser so it can
146
+ access its namespace.
147
+ </p>
148
+ </div>
149
+ </div>
150
+
151
+ <h3 class="section-bar">Public Instance methods</h3>
152
+
153
+ <div id="method-M000073" class="method-detail">
154
+ <a name="M000073"></a>
155
+
156
+ <div class="method-heading">
157
+ <a href="Template.src/M000073.html" target="Code" class="method-signature"
158
+ onclick="popupCode('Template.src/M000073.html');return false;">
159
+ <span class="method-name">output</span><span class="method-args">(object=nil)</span>
160
+ </a>
161
+ </div>
162
+
163
+ <div class="method-description">
164
+ <p>
165
+ <a href="Template.html#M000073">Template#output</a> is a special case for a
166
+ <a href="Command.html">Command</a>. Because <a
167
+ href="Template.html">Template</a> is what&#8217;s returned by <a
168
+ href="Parser.html#M000033">Parser.load</a>() or <a
169
+ href="Parser.html#M000035">Parser.parse</a>(), the programmer may well call
170
+ <a href="Template.html#M000073">Template#output</a>(anything).
171
+ </p>
172
+ <p>
173
+ If <tt>object</tt> is a <a href="Namespace.html">Namespace</a>, then treat
174
+ output as a typical <a href="BlockCommand.html">BlockCommand</a>. If
175
+ <tt>object</tt> is nil, then namespace is @parser. Otherwise, a new
176
+ namespace is created, a child of @namespace, and is assigned
177
+ <tt>object</tt> as its namespace
178
+ </p>
179
+ </div>
180
+ </div>
181
+
182
+ <div id="method-M000072" class="method-detail">
183
+ <a name="M000072"></a>
184
+
185
+ <div class="method-heading">
186
+ <a href="Template.src/M000072.html" target="Code" class="method-signature"
187
+ onclick="popupCode('Template.src/M000072.html');return false;">
188
+ <span class="method-name">to_s</span><span class="method-args">()</span>
189
+ </a>
190
+ </div>
191
+
192
+ <div class="method-description">
193
+ </div>
194
+ </div>
195
+
196
+
197
+ </div>
198
+
199
+
200
+ </div>
201
+
202
+
203
+ <div id="validator-badges">
204
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
205
+ </div>
206
+
207
+ </body>
208
+ </html>