PageTemplate 1.1.2 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CVS/Entries +10 -0
- data/CVS/Repository +1 -0
- data/CVS/Root +1 -0
- data/Changes +13 -0
- data/Changes~ +7 -0
- data/InstalledFiles +7 -0
- data/README.txt +1 -1
- data/Rakefile +1 -1
- data/Rakefile~ +54 -0
- data/TC_PageTemplate.rb +137 -19
- data/TC_PageTemplate.rb~ +965 -0
- data/doc/classes/BlockCommand.html +1 -1
- data/doc/classes/BlockCommand.src/M000004.html +1 -1
- data/doc/classes/BlockCommand.src/M000005.html +1 -1
- data/doc/classes/BlockCommand.src/M000006.html +1 -1
- data/doc/classes/BlockCommand.src/M000007.html +1 -1
- data/doc/classes/BlockCommand.src/M000008.html +1 -1
- data/doc/classes/Command.html +10 -10
- data/doc/classes/Command.src/{M000029.html → M000032.html} +0 -0
- data/doc/classes/Command.src/{M000030.html → M000033.html} +0 -0
- data/doc/classes/CommentCommand.html +146 -0
- data/doc/classes/CommentCommand.src/M000009.html +18 -0
- data/doc/classes/IfCommand.html +15 -15
- data/doc/classes/IfCommand.src/{M000039.html → M000042.html} +1 -1
- data/doc/classes/IfCommand.src/{M000040.html → M000043.html} +1 -1
- data/doc/classes/IfCommand.src/{M000041.html → M000044.html} +1 -1
- data/doc/classes/IfElseCommand.html +15 -15
- data/doc/classes/IfElseCommand.src/M000025.html +5 -6
- data/doc/classes/IfElseCommand.src/{M000024.html → M000026.html} +1 -1
- data/doc/classes/IfElseCommand.src/M000027.html +20 -0
- data/doc/classes/IncludeCommand.html +16 -23
- data/doc/classes/IncludeCommand.src/M000019.html +12 -4
- data/doc/classes/IncludeCommand.src/{M000018.html → M000020.html} +10 -5
- data/doc/classes/IncludeCommand.src/M000021.html +18 -0
- data/doc/classes/IncludeCommandError.html +118 -0
- data/doc/classes/LoopCommand.src/M000001.html +1 -1
- data/doc/classes/LoopCommand.src/M000002.html +11 -2
- data/doc/classes/LoopCommand.src/M000003.html +1 -1
- data/doc/classes/LoopElseCommand.html +15 -15
- data/doc/classes/LoopElseCommand.src/M000022.html +5 -6
- data/doc/classes/LoopElseCommand.src/{M000021.html → M000023.html} +1 -1
- data/doc/classes/LoopElseCommand.src/M000024.html +20 -0
- data/doc/classes/Namespace.html +42 -42
- data/doc/classes/Namespace.src/M000034.html +5 -5
- data/doc/classes/Namespace.src/M000035.html +4 -22
- data/doc/classes/Namespace.src/M000036.html +4 -7
- data/doc/classes/Namespace.src/M000037.html +5 -4
- data/doc/classes/Namespace.src/M000038.html +22 -4
- data/doc/classes/Namespace.src/M000039.html +21 -0
- data/doc/classes/Namespace.src/M000040.html +18 -0
- data/doc/classes/Namespace.src/{M000031.html → M000041.html} +4 -5
- data/doc/classes/PageTemplate.html +72 -44
- data/doc/classes/PageTemplate.src/M000010.html +31 -11
- data/doc/classes/PageTemplate.src/M000011.html +4 -4
- data/doc/classes/PageTemplate.src/M000012.html +15 -4
- data/doc/classes/PageTemplate.src/M000013.html +4 -4
- data/doc/classes/PageTemplate.src/M000014.html +4 -4
- data/doc/classes/PageTemplate.src/M000015.html +4 -4
- data/doc/classes/PageTemplate.src/M000016.html +4 -5
- data/doc/classes/PageTemplate.src/M000017.html +18 -0
- data/doc/classes/PageTemplate.src/M000018.html +19 -0
- data/doc/classes/Syntax/CachedParser.html +10 -10
- data/doc/classes/Syntax/CachedParser.src/{M000045.html → M000048.html} +1 -1
- data/doc/classes/Syntax/CachedParser.src/{M000046.html → M000049.html} +2 -1
- data/doc/classes/Syntax/Glossary.html +16 -10
- data/doc/classes/Syntax/Glossary.src/{M000047.html → M000050.html} +1 -1
- data/doc/classes/Syntax/Glossary.src/{M000048.html → M000051.html} +1 -1
- data/doc/classes/Syntax/Parser.html +31 -31
- data/doc/classes/Syntax/Parser.src/M000052.html +6 -5
- data/doc/classes/Syntax/Parser.src/M000053.html +20 -37
- data/doc/classes/Syntax/Parser.src/M000054.html +4 -93
- data/doc/classes/Syntax/Parser.src/{M000049.html → M000055.html} +5 -6
- data/doc/classes/Syntax/Parser.src/M000056.html +53 -0
- data/doc/classes/Syntax/Parser.src/M000057.html +111 -0
- data/doc/classes/Syntax.html +1 -1
- data/doc/classes/TextCommand.html +15 -15
- data/doc/classes/TextCommand.src/{M000042.html → M000045.html} +1 -1
- data/doc/classes/TextCommand.src/{M000043.html → M000046.html} +1 -1
- data/doc/classes/TextCommand.src/{M000044.html → M000047.html} +1 -1
- data/doc/classes/UnlessCommand.html +151 -0
- data/doc/classes/UnlessCommand.src/M000028.html +20 -0
- data/doc/classes/ValueCommand.html +15 -15
- data/doc/classes/ValueCommand.src/{M000026.html → M000029.html} +1 -1
- data/doc/classes/ValueCommand.src/{M000027.html → M000030.html} +1 -1
- data/doc/classes/ValueCommand.src/{M000028.html → M000031.html} +1 -1
- data/doc/created.rid +1 -1
- data/doc/files/README_txt.html +2 -2
- data/doc/files/lib/PageTemplate_rb.html +1 -1
- data/doc/fr_class_index.html +3 -0
- data/doc/fr_method_index.html +52 -49
- data/lib/CVS/Entries +2 -0
- data/lib/CVS/Repository +1 -0
- data/lib/CVS/Root +1 -0
- data/lib/PageTemplate.rb +103 -26
- data/lib/PageTemplate.rb~ +1004 -0
- data/pkg/PageTemplate-1.2.0.gem +0 -0
- data/tdata/CVS/Entries +28 -0
- data/tdata/CVS/Repository +1 -0
- data/tdata/CVS/Root +1 -0
- data/tdata/cm.txt +3 -0
- data/tdata/include.4.nf.out.txt +2 -0
- data/tdata/metadata.1.txt +5 -0
- data/tdata/metadata.2.txt +5 -0
- data/tdata/metadata.3.txt +5 -0
- data/tdata/metadata.4.txt +5 -0
- data/tdata/p/CVS/Entries +5 -0
- data/tdata/p/CVS/Repository +1 -0
- data/tdata/p/CVS/Root +1 -0
- data/tdata/p/CVS/b2.txt,t +0 -0
- data/tdata/p/b2.txt +4 -0
- data/tdata/p/b2.txt~ +4 -0
- metadata +70 -32
- data/doc/classes/IfElseCommand.src/M000023.html +0 -19
- data/doc/classes/IncludeCommand.src/M000017.html +0 -21
- data/doc/classes/LoopElseCommand.src/M000020.html +0 -19
- data/doc/classes/Namespace.src/M000032.html +0 -18
- data/doc/classes/Namespace.src/M000033.html +0 -18
- data/doc/classes/PageTemplate.src/M000009.html +0 -46
- data/doc/classes/Syntax/Parser.src/M000050.html +0 -35
- data/doc/classes/Syntax/Parser.src/M000051.html +0 -18
- data/lib/MANIFEST +0 -2
- data/pkg/PageTemplate-1.1.2.gem +0 -0
@@ -0,0 +1,111 @@
|
|
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>compile (Syntax::Parser)</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.rb, line 608</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">compile</span>(<span class="ruby-identifier">lines</span>, <span class="ruby-identifier">filename</span> = <span class="ruby-value str">"?"</span>)
|
15
|
+
|
16
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-node">"#{filename}: Compiling ..."</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">$DEBUG</span>
|
17
|
+
<span class="ruby-comment cmt"># Translate listing of text and directives into a BlockCommand</span>
|
18
|
+
<span class="ruby-identifier">commands</span> = <span class="ruby-constant">BlockCommand</span>.<span class="ruby-identifier">new</span>()
|
19
|
+
<span class="ruby-identifier">max</span> = <span class="ruby-identifier">lines</span>.<span class="ruby-identifier">length</span>
|
20
|
+
<span class="ruby-identifier">i</span> = <span class="ruby-value">0</span>
|
21
|
+
<span class="ruby-keyword kw">while</span> <span class="ruby-identifier">i</span> <span class="ruby-operator"><</span> <span class="ruby-identifier">max</span>
|
22
|
+
<span class="ruby-identifier">line</span> = <span class="ruby-identifier">lines</span>[<span class="ruby-identifier">i</span>]
|
23
|
+
<span class="ruby-identifier">type</span> = <span class="ruby-identifier">line</span>[<span class="ruby-value">1</span>].<span class="ruby-identifier">class</span>
|
24
|
+
<span class="ruby-identifier">command</span> = <span class="ruby-keyword kw">nil</span>
|
25
|
+
<span class="ruby-comment cmt">#puts "#{filename}/#{line[0]}: #{type} -- #{line}"</span>
|
26
|
+
|
27
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">type</span> <span class="ruby-operator">==</span> <span class="ruby-constant">String</span>
|
28
|
+
<span class="ruby-identifier">command</span> = <span class="ruby-constant">TextCommand</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">line</span>[<span class="ruby-value">1</span>])
|
29
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">type</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Array</span>
|
30
|
+
<span class="ruby-identifier">directive</span> = <span class="ruby-identifier">line</span>[<span class="ruby-value">1</span>][<span class="ruby-value">0</span>]
|
31
|
+
<span class="ruby-identifier">value</span> = <span class="ruby-identifier">line</span>[<span class="ruby-value">1</span>][<span class="ruby-value">1</span>]
|
32
|
+
<span class="ruby-identifier">print</span> <span class="ruby-node">"(#{directive} #{value}) "</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">$DEBUG</span>
|
33
|
+
|
34
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">directive</span> <span class="ruby-operator">==</span> <span class="ruby-value str">"value"</span>
|
35
|
+
<span class="ruby-identifier">command</span> = <span class="ruby-constant">ValueCommand</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">value</span>)
|
36
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">directive</span> <span class="ruby-operator">==</span> <span class="ruby-value str">"include"</span>
|
37
|
+
<span class="ruby-identifier">command</span> = <span class="ruby-constant">IncludeCommand</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">value</span>, <span class="ruby-ivar">@path</span>)
|
38
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">directive</span> <span class="ruby-operator">==</span> <span class="ruby-value str">"comment"</span>
|
39
|
+
<span class="ruby-identifier">command</span> = <span class="ruby-constant">CommentCommand</span>.<span class="ruby-identifier">new</span>()
|
40
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">directive</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/^(\w+?)open$/</span>
|
41
|
+
<span class="ruby-identifier">mainBlock</span> = <span class="ruby-keyword kw">nil</span>
|
42
|
+
<span class="ruby-identifier">branchBlock</span> = <span class="ruby-keyword kw">nil</span>
|
43
|
+
<span class="ruby-identifier">close</span> = <span class="ruby-keyword kw">nil</span>
|
44
|
+
<span class="ruby-identifier">branch</span> = <span class="ruby-keyword kw">nil</span>
|
45
|
+
|
46
|
+
<span class="ruby-identifier">block</span> = <span class="ruby-identifier">$1</span>
|
47
|
+
<span class="ruby-identifier">startIndex</span> = <span class="ruby-identifier">i</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>
|
48
|
+
<span class="ruby-identifier">closers</span> = <span class="ruby-identifier">findClose</span>(<span class="ruby-identifier">lines</span>[<span class="ruby-identifier">startIndex</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>],
|
49
|
+
<span class="ruby-identifier">startIndex</span>, <span class="ruby-identifier">block</span>)
|
50
|
+
|
51
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">closers</span>[<span class="ruby-value str">'close'</span>]
|
52
|
+
<span class="ruby-identifier">close</span> = <span class="ruby-identifier">closers</span>[<span class="ruby-value str">'close'</span>]
|
53
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">closers</span>[<span class="ruby-value str">'branch'</span>]
|
54
|
+
<span class="ruby-identifier">branch</span> = <span class="ruby-identifier">closers</span>[<span class="ruby-value str">'branch'</span>]
|
55
|
+
<span class="ruby-identifier">mainLines</span> = <span class="ruby-identifier">lines</span>[<span class="ruby-identifier">startIndex</span><span class="ruby-operator">...</span><span class="ruby-identifier">branch</span>]
|
56
|
+
<span class="ruby-identifier">mainBlock</span> = <span class="ruby-identifier">compile</span>(<span class="ruby-identifier">mainLines</span>)
|
57
|
+
<span class="ruby-identifier">branchLines</span> = <span class="ruby-identifier">lines</span>[<span class="ruby-identifier">branch</span><span class="ruby-operator">+</span><span class="ruby-value">1</span><span class="ruby-operator">...</span><span class="ruby-identifier">close</span>]
|
58
|
+
<span class="ruby-identifier">branchBlock</span> = <span class="ruby-identifier">compile</span>(<span class="ruby-identifier">branchLines</span>)
|
59
|
+
<span class="ruby-keyword kw">else</span>
|
60
|
+
<span class="ruby-identifier">mainLines</span> = <span class="ruby-identifier">lines</span>[<span class="ruby-identifier">startIndex</span><span class="ruby-operator">...</span><span class="ruby-identifier">close</span>]
|
61
|
+
<span class="ruby-identifier">mainBlock</span> = <span class="ruby-identifier">compile</span>(<span class="ruby-identifier">mainLines</span>)
|
62
|
+
<span class="ruby-keyword kw">end</span>
|
63
|
+
<span class="ruby-keyword kw">else</span>
|
64
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-node">"#{filename}:#{line[0]} - "</span> <span class="ruby-operator">+</span>
|
65
|
+
<span class="ruby-node">"#{block} #{value} doesn't close"</span>
|
66
|
+
<span class="ruby-keyword kw">end</span>
|
67
|
+
|
68
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block</span> <span class="ruby-operator">==</span> <span class="ruby-value str">"if"</span>
|
69
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">mainBlock</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">branchBlock</span>
|
70
|
+
<span class="ruby-identifier">command</span> = <span class="ruby-constant">IfElseCommand</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">value</span>,
|
71
|
+
<span class="ruby-identifier">mainBlock</span>, <span class="ruby-identifier">branchBlock</span>)
|
72
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">mainBlock</span>
|
73
|
+
<span class="ruby-identifier">command</span> = <span class="ruby-constant">IfCommand</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">value</span>, <span class="ruby-identifier">mainBlock</span>)
|
74
|
+
<span class="ruby-keyword kw">end</span>
|
75
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">block</span> <span class="ruby-operator">==</span> <span class="ruby-value str">"unless"</span>
|
76
|
+
<span class="ruby-identifier">command</span> = <span class="ruby-constant">UnlessCommand</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">value</span>, <span class="ruby-identifier">mainBlock</span>)
|
77
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">block</span> <span class="ruby-operator">==</span> <span class="ruby-value str">"loop"</span>
|
78
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">mainBlock</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">branchBlock</span>
|
79
|
+
<span class="ruby-identifier">command</span> = <span class="ruby-constant">LoopElseCommand</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">value</span>,
|
80
|
+
<span class="ruby-identifier">mainBlock</span>, <span class="ruby-identifier">branchBlock</span>)
|
81
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">mainBlock</span>
|
82
|
+
<span class="ruby-identifier">command</span> = <span class="ruby-constant">LoopCommand</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">value</span>, <span class="ruby-identifier">mainBlock</span>)
|
83
|
+
<span class="ruby-keyword kw">end</span>
|
84
|
+
<span class="ruby-keyword kw">else</span>
|
85
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-node">"#{filename}: #{line[0]} - "</span> <span class="ruby-operator">+</span>
|
86
|
+
<span class="ruby-node">"Unrecognized block type '#{block}'"</span>
|
87
|
+
<span class="ruby-keyword kw">end</span>
|
88
|
+
|
89
|
+
<span class="ruby-comment cmt"># Skip to the line after the block closer.</span>
|
90
|
+
<span class="ruby-identifier">i</span> = <span class="ruby-identifier">close</span>
|
91
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-value str">%Q[
|
92
|
+
ifbranch ifclose loopbranch loopclose unlessclose
|
93
|
+
]</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">directive</span>)
|
94
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-node">"#{filename}:#{line[0]} - #{directive}"</span> <span class="ruby-operator">+</span>
|
95
|
+
<span class="ruby-value str">" without corresponding opening directive"</span>
|
96
|
+
<span class="ruby-keyword kw">else</span>
|
97
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-node">"#{filename}:#{line[0]} - Unknown command #{directive}"</span>
|
98
|
+
<span class="ruby-keyword kw">end</span>
|
99
|
+
<span class="ruby-keyword kw">else</span>
|
100
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-node">"#{filename}: Unknown instruction in line #{line}"</span>
|
101
|
+
<span class="ruby-keyword kw">end</span>
|
102
|
+
|
103
|
+
<span class="ruby-identifier">commands</span>.<span class="ruby-identifier">add</span>(<span class="ruby-identifier">command</span>)
|
104
|
+
<span class="ruby-identifier">i</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
105
|
+
<span class="ruby-keyword kw">end</span>
|
106
|
+
|
107
|
+
<span class="ruby-comment cmt"># Return compiled BlockCommand</span>
|
108
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">commands</span>
|
109
|
+
<span class="ruby-keyword kw">end</span></pre>
|
110
|
+
</body>
|
111
|
+
</html>
|
data/doc/classes/Syntax.html
CHANGED
@@ -107,7 +107,7 @@ Class <a href="Syntax/Parser.html" class="link">Syntax::Parser</a><br />
|
|
107
107
|
<tr class="top-aligned-row context-row">
|
108
108
|
<td class="context-item-name">DEFAULT</td>
|
109
109
|
<td>=</td>
|
110
|
-
<td class="context-item-value">Syntax::Glossary.new( /\[%(.+?)%\]/, 'value' => /^\s*var (\w+)\s*$/, 'ifopen' => /^\s*if (\w+)\s*$/, 'ifclose' => /^\s*endif\s*$/, 'ifbranch' => /^\s*else\s*$/, 'loopopen' => /^\s*in (\w+)\s*$/, 'loopclose' => /^\s*endin\s*$/, 'loopbranch' => /^\s*no\s*$/, 'include' => /^\s*include (\S+)\s*$/</td>
|
110
|
+
<td class="context-item-value">Syntax::Glossary.new( /\[%(.+?)%\]/, 'value' => /^\s*var (\w+)\s*$/, 'comment' => /^\s*--.+?--\s*$/, 'ifopen' => /^\s*if (\w+)\s*$/, 'ifclose' => /^\s*endif\s*$/, 'ifbranch' => /^\s*else\s*$/, 'unlessopen' => /^\s*unless (\w+)\s*$/, 'unlessclose'=> /^\s*endunless\s*$/, 'loopopen' => /^\s*in (\w+)\s*$/, 'loopclose' => /^\s*endin\s*$/, 'loopbranch' => /^\s*no\s*$/, 'include' => /^\s*include (\S+)\s*$/</td>
|
111
111
|
<td width="3em"> </td>
|
112
112
|
<td class="context-item-desc">
|
113
113
|
Notice that I used a space before the closing braces. This <a
|
@@ -95,9 +95,9 @@ string of text
|
|
95
95
|
<h3 class="section-bar">Methods</h3>
|
96
96
|
|
97
97
|
<div class="name-list">
|
98
|
-
<a href="#
|
99
|
-
<a href="#
|
100
|
-
<a href="#
|
98
|
+
<a href="#M000045">new</a>
|
99
|
+
<a href="#M000047">output</a>
|
100
|
+
<a href="#M000046">to_s</a>
|
101
101
|
</div>
|
102
102
|
</div>
|
103
103
|
|
@@ -119,12 +119,12 @@ string of text
|
|
119
119
|
<div id="methods">
|
120
120
|
<h3 class="section-bar">Public Class methods</h3>
|
121
121
|
|
122
|
-
<div id="method-
|
123
|
-
<a name="
|
122
|
+
<div id="method-M000045" class="method-detail">
|
123
|
+
<a name="M000045"></a>
|
124
124
|
|
125
125
|
<div class="method-heading">
|
126
|
-
<a href="TextCommand.src/
|
127
|
-
onclick="popupCode('TextCommand.src/
|
126
|
+
<a href="TextCommand.src/M000045.html" target="Code" class="method-signature"
|
127
|
+
onclick="popupCode('TextCommand.src/M000045.html');return false;">
|
128
128
|
<span class="method-name">new</span><span class="method-args">(text)</span>
|
129
129
|
</a>
|
130
130
|
</div>
|
@@ -139,12 +139,12 @@ Creates a <a href="TextCommand.html">TextCommand</a> object, saving
|
|
139
139
|
|
140
140
|
<h3 class="section-bar">Public Instance methods</h3>
|
141
141
|
|
142
|
-
<div id="method-
|
143
|
-
<a name="
|
142
|
+
<div id="method-M000047" class="method-detail">
|
143
|
+
<a name="M000047"></a>
|
144
144
|
|
145
145
|
<div class="method-heading">
|
146
|
-
<a href="TextCommand.src/
|
147
|
-
onclick="popupCode('TextCommand.src/
|
146
|
+
<a href="TextCommand.src/M000047.html" target="Code" class="method-signature"
|
147
|
+
onclick="popupCode('TextCommand.src/M000047.html');return false;">
|
148
148
|
<span class="method-name">output</span><span class="method-args">(namespace = nil)</span>
|
149
149
|
</a>
|
150
150
|
</div>
|
@@ -156,12 +156,12 @@ Returns the string provided during this object’s creation.
|
|
156
156
|
</div>
|
157
157
|
</div>
|
158
158
|
|
159
|
-
<div id="method-
|
160
|
-
<a name="
|
159
|
+
<div id="method-M000046" class="method-detail">
|
160
|
+
<a name="M000046"></a>
|
161
161
|
|
162
162
|
<div class="method-heading">
|
163
|
-
<a href="TextCommand.src/
|
164
|
-
onclick="popupCode('TextCommand.src/
|
163
|
+
<a href="TextCommand.src/M000046.html" target="Code" class="method-signature"
|
164
|
+
onclick="popupCode('TextCommand.src/M000046.html');return false;">
|
165
165
|
<span class="method-name">to_s</span><span class="method-args">()</span>
|
166
166
|
</a>
|
167
167
|
</div>
|
@@ -10,7 +10,7 @@
|
|
10
10
|
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/PageTemplate.rb, line
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/PageTemplate.rb, line 186</span>
|
14
14
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">text</span>)
|
15
15
|
<span class="ruby-ivar">@text</span> = <span class="ruby-identifier">text</span>
|
16
16
|
<span class="ruby-keyword kw">end</span></pre>
|
@@ -10,7 +10,7 @@
|
|
10
10
|
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/PageTemplate.rb, line
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/PageTemplate.rb, line 190</span>
|
14
14
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span>
|
15
15
|
<span class="ruby-keyword kw">return</span> <span class="ruby-node">"#{self.type}: '#{@text}'"</span>
|
16
16
|
<span class="ruby-keyword kw">end</span></pre>
|
@@ -10,7 +10,7 @@
|
|
10
10
|
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/PageTemplate.rb, line
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/PageTemplate.rb, line 195</span>
|
14
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
15
|
<span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@text</span>
|
16
16
|
<span class="ruby-keyword kw">end</span></pre>
|
@@ -0,0 +1,151 @@
|
|
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: UnlessCommand</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">UnlessCommand</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../files/lib/PageTemplate_rb.html">
|
59
|
+
lib/PageTemplate.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="IfCommand.html">
|
69
|
+
IfCommand
|
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
|
+
An <a href="UnlessCommand.html">UnlessCommand</a> simplifies templates that
|
86
|
+
need to use a Block only if a condition is false
|
87
|
+
</p>
|
88
|
+
|
89
|
+
</div>
|
90
|
+
|
91
|
+
|
92
|
+
</div>
|
93
|
+
|
94
|
+
<div id="method-list">
|
95
|
+
<h3 class="section-bar">Methods</h3>
|
96
|
+
|
97
|
+
<div class="name-list">
|
98
|
+
<a href="#M000028">output</a>
|
99
|
+
</div>
|
100
|
+
</div>
|
101
|
+
|
102
|
+
</div>
|
103
|
+
|
104
|
+
|
105
|
+
<!-- if includes -->
|
106
|
+
|
107
|
+
<div id="section">
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
|
116
|
+
<!-- if method_list -->
|
117
|
+
<div id="methods">
|
118
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
119
|
+
|
120
|
+
<div id="method-M000028" class="method-detail">
|
121
|
+
<a name="M000028"></a>
|
122
|
+
|
123
|
+
<div class="method-heading">
|
124
|
+
<a href="UnlessCommand.src/M000028.html" target="Code" class="method-signature"
|
125
|
+
onclick="popupCode('UnlessCommand.src/M000028.html');return false;">
|
126
|
+
<span class="method-name">output</span><span class="method-args">(namespace)</span>
|
127
|
+
</a>
|
128
|
+
</div>
|
129
|
+
|
130
|
+
<div class="method-description">
|
131
|
+
<p>
|
132
|
+
If <tt>namespace</tt> does not have a true value for this <a
|
133
|
+
href="Command.html">Command</a>’s flag, returns the output generated
|
134
|
+
by the CommandBlock. Otherwise, returns nil.
|
135
|
+
</p>
|
136
|
+
</div>
|
137
|
+
</div>
|
138
|
+
|
139
|
+
|
140
|
+
</div>
|
141
|
+
|
142
|
+
|
143
|
+
</div>
|
144
|
+
|
145
|
+
|
146
|
+
<div id="validator-badges">
|
147
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
148
|
+
</div>
|
149
|
+
|
150
|
+
</body>
|
151
|
+
</html>
|
@@ -0,0 +1,20 @@
|
|
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 (UnlessCommand)</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.rb, line 255</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">output</span>(<span class="ruby-identifier">namespace</span>)
|
15
|
+
<span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">namespace</span>.<span class="ruby-identifier">true?</span>(<span class="ruby-ivar">@value</span>)
|
16
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@commands</span>.<span class="ruby-identifier">output</span>(<span class="ruby-identifier">namespace</span>)
|
17
|
+
<span class="ruby-keyword kw">end</span>
|
18
|
+
<span class="ruby-keyword kw">end</span></pre>
|
19
|
+
</body>
|
20
|
+
</html>
|
@@ -94,9 +94,9 @@ A <a href="Command.html">Command</a> that is tied to a variable name.
|
|
94
94
|
<h3 class="section-bar">Methods</h3>
|
95
95
|
|
96
96
|
<div class="name-list">
|
97
|
-
<a href="#
|
98
|
-
<a href="#
|
99
|
-
<a href="#
|
97
|
+
<a href="#M000029">new</a>
|
98
|
+
<a href="#M000030">output</a>
|
99
|
+
<a href="#M000031">to_s</a>
|
100
100
|
</div>
|
101
101
|
</div>
|
102
102
|
|
@@ -118,12 +118,12 @@ A <a href="Command.html">Command</a> that is tied to a variable name.
|
|
118
118
|
<div id="methods">
|
119
119
|
<h3 class="section-bar">Public Class methods</h3>
|
120
120
|
|
121
|
-
<div id="method-
|
122
|
-
<a name="
|
121
|
+
<div id="method-M000029" class="method-detail">
|
122
|
+
<a name="M000029"></a>
|
123
123
|
|
124
124
|
<div class="method-heading">
|
125
|
-
<a href="ValueCommand.src/
|
126
|
-
onclick="popupCode('ValueCommand.src/
|
125
|
+
<a href="ValueCommand.src/M000029.html" target="Code" class="method-signature"
|
126
|
+
onclick="popupCode('ValueCommand.src/M000029.html');return false;">
|
127
127
|
<span class="method-name">new</span><span class="method-args">(value)</span>
|
128
128
|
</a>
|
129
129
|
</div>
|
@@ -138,12 +138,12 @@ Creates the <a href="ValueCommand.html">ValueCommand</a>, with
|
|
138
138
|
|
139
139
|
<h3 class="section-bar">Public Instance methods</h3>
|
140
140
|
|
141
|
-
<div id="method-
|
142
|
-
<a name="
|
141
|
+
<div id="method-M000030" class="method-detail">
|
142
|
+
<a name="M000030"></a>
|
143
143
|
|
144
144
|
<div class="method-heading">
|
145
|
-
<a href="ValueCommand.src/
|
146
|
-
onclick="popupCode('ValueCommand.src/
|
145
|
+
<a href="ValueCommand.src/M000030.html" target="Code" class="method-signature"
|
146
|
+
onclick="popupCode('ValueCommand.src/M000030.html');return false;">
|
147
147
|
<span class="method-name">output</span><span class="method-args">(namespace)</span>
|
148
148
|
</a>
|
149
149
|
</div>
|
@@ -157,12 +157,12 @@ the caller.
|
|
157
157
|
</div>
|
158
158
|
</div>
|
159
159
|
|
160
|
-
<div id="method-
|
161
|
-
<a name="
|
160
|
+
<div id="method-M000031" class="method-detail">
|
161
|
+
<a name="M000031"></a>
|
162
162
|
|
163
163
|
<div class="method-heading">
|
164
|
-
<a href="ValueCommand.src/
|
165
|
-
onclick="popupCode('ValueCommand.src/
|
164
|
+
<a href="ValueCommand.src/M000031.html" target="Code" class="method-signature"
|
165
|
+
onclick="popupCode('ValueCommand.src/M000031.html');return false;">
|
166
166
|
<span class="method-name">to_s</span><span class="method-args">()</span>
|
167
167
|
</a>
|
168
168
|
</div>
|
@@ -10,7 +10,7 @@
|
|
10
10
|
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/PageTemplate.rb, line
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/PageTemplate.rb, line 205</span>
|
14
14
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">value</span>)
|
15
15
|
<span class="ruby-ivar">@value</span> = <span class="ruby-identifier">value</span>
|
16
16
|
<span class="ruby-keyword kw">end</span></pre>
|
@@ -10,7 +10,7 @@
|
|
10
10
|
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/PageTemplate.rb, line
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/PageTemplate.rb, line 212</span>
|
14
14
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">output</span>(<span class="ruby-identifier">namespace</span>)
|
15
15
|
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">namespace</span>.<span class="ruby-identifier">get</span>(<span class="ruby-ivar">@value</span>).<span class="ruby-identifier">to_s</span>
|
16
16
|
<span class="ruby-keyword kw">end</span></pre>
|
@@ -10,7 +10,7 @@
|
|
10
10
|
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/PageTemplate.rb, line
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/PageTemplate.rb, line 216</span>
|
14
14
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span>
|
15
15
|
<span class="ruby-identifier">str</span> = <span class="ruby-keyword kw">super</span>.<span class="ruby-identifier">to_s</span>
|
16
16
|
<span class="ruby-identifier">str</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"(#{@value})"</span>
|
data/doc/created.rid
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
Fri Mar 11 14:22:59 PST 2005
|
data/doc/files/README_txt.html
CHANGED
@@ -56,7 +56,7 @@
|
|
56
56
|
</tr>
|
57
57
|
<tr class="top-aligned-row">
|
58
58
|
<td><strong>Last Update:</strong></td>
|
59
|
-
<td>
|
59
|
+
<td>Thu Mar 10 17:48:29 PST 2005</td>
|
60
60
|
</tr>
|
61
61
|
</table>
|
62
62
|
</div>
|
@@ -96,7 +96,7 @@ href="http://www.coolnamehere.com/products/pagetemplate">www.coolnamehere.com/pr
|
|
96
96
|
<li>Variable substitution
|
97
97
|
|
98
98
|
</li>
|
99
|
-
<li>If and If/Else structures
|
99
|
+
<li>If, Unless, and If/Else structures
|
100
100
|
|
101
101
|
</li>
|
102
102
|
<li>Loops and Loop/Else structures
|
data/doc/fr_class_index.html
CHANGED
@@ -22,9 +22,11 @@
|
|
22
22
|
<div id="index-entries">
|
23
23
|
<a href="classes/BlockCommand.html">BlockCommand</a><br />
|
24
24
|
<a href="classes/Command.html">Command</a><br />
|
25
|
+
<a href="classes/CommentCommand.html">CommentCommand</a><br />
|
25
26
|
<a href="classes/IfCommand.html">IfCommand</a><br />
|
26
27
|
<a href="classes/IfElseCommand.html">IfElseCommand</a><br />
|
27
28
|
<a href="classes/IncludeCommand.html">IncludeCommand</a><br />
|
29
|
+
<a href="classes/IncludeCommandError.html">IncludeCommandError</a><br />
|
28
30
|
<a href="classes/LoopCommand.html">LoopCommand</a><br />
|
29
31
|
<a href="classes/LoopElseCommand.html">LoopElseCommand</a><br />
|
30
32
|
<a href="classes/Namespace.html">Namespace</a><br />
|
@@ -34,6 +36,7 @@
|
|
34
36
|
<a href="classes/Syntax/Glossary.html">Syntax::Glossary</a><br />
|
35
37
|
<a href="classes/Syntax/Parser.html">Syntax::Parser</a><br />
|
36
38
|
<a href="classes/TextCommand.html">TextCommand</a><br />
|
39
|
+
<a href="classes/UnlessCommand.html">UnlessCommand</a><br />
|
37
40
|
<a href="classes/ValueCommand.html">ValueCommand</a><br />
|
38
41
|
</div>
|
39
42
|
</div>
|