PageTemplate 1.1.2 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- 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
@@ -10,14 +10,19 @@
|
|
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 956</span>
|
14
14
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">output</span>(<span class="ruby-identifier">ns</span>=<span class="ruby-keyword kw">nil</span>)
|
15
15
|
<span class="ruby-comment cmt"># First check to see if the file exists in the current working directory</span>
|
16
16
|
<span class="ruby-comment cmt"># or as an absolute filename.</span>
|
17
|
-
<span class="ruby-identifier">
|
18
|
-
<span class="ruby-
|
19
|
-
|
20
|
-
|
17
|
+
<span class="ruby-identifier">text</span> = <span class="ruby-value str">""</span>
|
18
|
+
<span class="ruby-keyword kw">begin</span>
|
19
|
+
<span class="ruby-identifier">file</span> = <span class="ruby-identifier">determine_file</span>(<span class="ruby-identifier">ns</span>)
|
20
|
+
<span class="ruby-ivar">@parser</span>.<span class="ruby-identifier">build</span>(<span class="ruby-identifier">file</span>)
|
21
|
+
<span class="ruby-identifier">text</span> = <span class="ruby-ivar">@parser</span>.<span class="ruby-identifier">output</span>(<span class="ruby-identifier">ns</span>)
|
22
|
+
<span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">IncludeCommandError</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">error</span>
|
23
|
+
<span class="ruby-identifier">text</span> = <span class="ruby-identifier">error</span>
|
24
|
+
<span class="ruby-keyword kw">end</span>
|
25
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">text</span>
|
21
26
|
<span class="ruby-keyword kw">end</span></pre>
|
22
27
|
</body>
|
23
28
|
</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>to_s (IncludeCommand)</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 970</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span>
|
15
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-node">"IncludeCommand {path: '#{@path}' filename: '#{@filename}'}"</span>
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
17
|
+
</body>
|
18
|
+
</html>
|
@@ -0,0 +1,118 @@
|
|
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: IncludeCommandError</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">IncludeCommandError</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
|
+
RuntimeError
|
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
|
+
<a href="IncludeCommand.html">IncludeCommand</a> allows including text from
|
84
|
+
external files.
|
85
|
+
</p>
|
86
|
+
|
87
|
+
</div>
|
88
|
+
|
89
|
+
|
90
|
+
</div>
|
91
|
+
|
92
|
+
|
93
|
+
</div>
|
94
|
+
|
95
|
+
|
96
|
+
<!-- if includes -->
|
97
|
+
|
98
|
+
<div id="section">
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
<!-- if method_list -->
|
108
|
+
|
109
|
+
|
110
|
+
</div>
|
111
|
+
|
112
|
+
|
113
|
+
<div id="validator-badges">
|
114
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
115
|
+
</div>
|
116
|
+
|
117
|
+
</body>
|
118
|
+
</html>
|
@@ -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 304</span>
|
14
14
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">listName</span>, <span class="ruby-identifier">commandBlock</span>)
|
15
15
|
<span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">listName</span>)
|
16
16
|
<span class="ruby-ivar">@commands</span> = <span class="ruby-identifier">commandBlock</span>
|
@@ -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 313</span>
|
14
14
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">output</span>(<span class="ruby-identifier">namespace</span>)
|
15
15
|
|
16
16
|
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span> <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>)
|
@@ -21,10 +21,19 @@
|
|
21
21
|
|
22
22
|
<span class="ruby-identifier">result</span> = <span class="ruby-value str">""</span>
|
23
23
|
|
24
|
-
<span class="ruby-identifier">items</span>.<span class="ruby-identifier">
|
24
|
+
<span class="ruby-identifier">items</span>.<span class="ruby-identifier">each_with_index</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">item</span>, <span class="ruby-identifier">index</span><span class="ruby-operator">|</span>
|
25
|
+
<span class="ruby-identifier">metavariables</span> = <span class="ruby-constant">Namespace</span>.<span class="ruby-identifier">new</span>()
|
26
|
+
<span class="ruby-identifier">metavariables</span>[<span class="ruby-value str">'__FIRST__'</span>] = <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">index</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
|
27
|
+
<span class="ruby-identifier">metavariables</span>[<span class="ruby-value str">'__LAST__'</span>] = <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">index</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">items</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span>
|
28
|
+
<span class="ruby-comment cmt"># Even-numbered index means an odd-numbered iteration. </span>
|
29
|
+
<span class="ruby-comment cmt"># Gotta love zero-based indexes.</span>
|
30
|
+
<span class="ruby-identifier">metavariables</span>[<span class="ruby-value str">'__ODD__'</span>] = <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">index</span> <span class="ruby-operator">%</span> <span class="ruby-value">2</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
|
31
|
+
|
32
|
+
<span class="ruby-identifier">namespace</span>.<span class="ruby-identifier">push</span>(<span class="ruby-identifier">metavariables</span>)
|
25
33
|
<span class="ruby-identifier">namespace</span>.<span class="ruby-identifier">push</span>(<span class="ruby-identifier">item</span>)
|
26
34
|
<span class="ruby-identifier">result</span> <span class="ruby-operator">+=</span> <span class="ruby-ivar">@commands</span>.<span class="ruby-identifier">output</span>(<span class="ruby-identifier">namespace</span>)
|
27
35
|
<span class="ruby-identifier">namespace</span>.<span class="ruby-identifier">pop</span>()
|
36
|
+
<span class="ruby-identifier">namespace</span>.<span class="ruby-identifier">pop</span>()
|
28
37
|
<span class="ruby-keyword kw">end</span>
|
29
38
|
|
30
39
|
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">result</span>
|
@@ -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 341</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-ivar">@commands</span>.<span class="ruby-identifier">to_s</span>
|
@@ -96,9 +96,9 @@ href="Command.html">Command</a> variable does not exist.
|
|
96
96
|
<h3 class="section-bar">Methods</h3>
|
97
97
|
|
98
98
|
<div class="name-list">
|
99
|
-
<a href="#
|
100
|
-
<a href="#
|
101
|
-
<a href="#
|
99
|
+
<a href="#M000022">new</a>
|
100
|
+
<a href="#M000023">output</a>
|
101
|
+
<a href="#M000024">to_s</a>
|
102
102
|
</div>
|
103
103
|
</div>
|
104
104
|
|
@@ -120,12 +120,12 @@ href="Command.html">Command</a> variable does not exist.
|
|
120
120
|
<div id="methods">
|
121
121
|
<h3 class="section-bar">Public Class methods</h3>
|
122
122
|
|
123
|
-
<div id="method-
|
124
|
-
<a name="
|
123
|
+
<div id="method-M000022" class="method-detail">
|
124
|
+
<a name="M000022"></a>
|
125
125
|
|
126
126
|
<div class="method-heading">
|
127
|
-
<a href="LoopElseCommand.src/
|
128
|
-
onclick="popupCode('LoopElseCommand.src/
|
127
|
+
<a href="LoopElseCommand.src/M000022.html" target="Code" class="method-signature"
|
128
|
+
onclick="popupCode('LoopElseCommand.src/M000022.html');return false;">
|
129
129
|
<span class="method-name">new</span><span class="method-args">(loopName, trueBlock, elseBlock)</span>
|
130
130
|
</a>
|
131
131
|
</div>
|
@@ -142,12 +142,12 @@ if the loop does not exist.
|
|
142
142
|
|
143
143
|
<h3 class="section-bar">Public Instance methods</h3>
|
144
144
|
|
145
|
-
<div id="method-
|
146
|
-
<a name="
|
145
|
+
<div id="method-M000023" class="method-detail">
|
146
|
+
<a name="M000023"></a>
|
147
147
|
|
148
148
|
<div class="method-heading">
|
149
|
-
<a href="LoopElseCommand.src/
|
150
|
-
onclick="popupCode('LoopElseCommand.src/
|
149
|
+
<a href="LoopElseCommand.src/M000023.html" target="Code" class="method-signature"
|
150
|
+
onclick="popupCode('LoopElseCommand.src/M000023.html');return false;">
|
151
151
|
<span class="method-name">output</span><span class="method-args">(namespace)</span>
|
152
152
|
</a>
|
153
153
|
</div>
|
@@ -161,12 +161,12 @@ href="BlockCommand.html">BlockCommand</a> if not.
|
|
161
161
|
</div>
|
162
162
|
</div>
|
163
163
|
|
164
|
-
<div id="method-
|
165
|
-
<a name="
|
164
|
+
<div id="method-M000024" class="method-detail">
|
165
|
+
<a name="M000024"></a>
|
166
166
|
|
167
167
|
<div class="method-heading">
|
168
|
-
<a href="LoopElseCommand.src/
|
169
|
-
onclick="popupCode('LoopElseCommand.src/
|
168
|
+
<a href="LoopElseCommand.src/M000024.html" target="Code" class="method-signature"
|
169
|
+
onclick="popupCode('LoopElseCommand.src/M000024.html');return false;">
|
170
170
|
<span class="method-name">to_s</span><span class="method-args">()</span>
|
171
171
|
</a>
|
172
172
|
</div>
|
@@ -5,16 +5,15 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>new (LoopElseCommand)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
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
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">
|
15
|
-
<span class="ruby-
|
16
|
-
<span class="ruby-
|
17
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">str</span>
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/PageTemplate.rb, line 356</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">loopName</span>, <span class="ruby-identifier">trueBlock</span>, <span class="ruby-identifier">elseBlock</span>)
|
15
|
+
<span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">loopName</span>, <span class="ruby-identifier">trueBlock</span>)
|
16
|
+
<span class="ruby-ivar">@elseCommands</span> = <span class="ruby-identifier">elseBlock</span>
|
18
17
|
<span class="ruby-keyword kw">end</span></pre>
|
19
18
|
</body>
|
20
19
|
</html>
|
@@ -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 363</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-identifier">result</span> = <span class="ruby-keyword kw">super</span>
|
16
16
|
<span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">result</span>
|
@@ -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>to_s (LoopElseCommand)</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 372</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-keyword kw">super</span>.<span class="ruby-identifier">to_s</span>
|
16
|
+
<span class="ruby-identifier">str</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">" - NO "</span> <span class="ruby-operator">+</span> <span class="ruby-ivar">@elseCommands</span>.<span class="ruby-identifier">to_s</span>
|
17
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">str</span>
|
18
|
+
<span class="ruby-keyword kw">end</span></pre>
|
19
|
+
</body>
|
20
|
+
</html>
|
data/doc/classes/Namespace.html
CHANGED
@@ -92,14 +92,14 @@ Allows nested storage of variable names and values.
|
|
92
92
|
<h3 class="section-bar">Methods</h3>
|
93
93
|
|
94
94
|
<div class="name-list">
|
95
|
-
<a href="#
|
96
|
-
<a href="#
|
97
|
-
<a href="#
|
98
|
-
<a href="#
|
99
|
-
<a href="#
|
100
|
-
<a href="#
|
101
|
-
<a href="#
|
102
|
-
<a href="#
|
95
|
+
<a href="#M000036">[]</a>
|
96
|
+
<a href="#M000035">[]=</a>
|
97
|
+
<a href="#M000038">get</a>
|
98
|
+
<a href="#M000034">new</a>
|
99
|
+
<a href="#M000041">pop</a>
|
100
|
+
<a href="#M000040">push</a>
|
101
|
+
<a href="#M000037">set</a>
|
102
|
+
<a href="#M000039">true?</a>
|
103
103
|
</div>
|
104
104
|
</div>
|
105
105
|
|
@@ -121,12 +121,12 @@ Allows nested storage of variable names and values.
|
|
121
121
|
<div id="methods">
|
122
122
|
<h3 class="section-bar">Public Class methods</h3>
|
123
123
|
|
124
|
-
<div id="method-
|
125
|
-
<a name="
|
124
|
+
<div id="method-M000034" class="method-detail">
|
125
|
+
<a name="M000034"></a>
|
126
126
|
|
127
127
|
<div class="method-heading">
|
128
|
-
<a href="Namespace.src/
|
129
|
-
onclick="popupCode('Namespace.src/
|
128
|
+
<a href="Namespace.src/M000034.html" target="Code" class="method-signature"
|
129
|
+
onclick="popupCode('Namespace.src/M000034.html');return false;">
|
130
130
|
<span class="method-name">new</span><span class="method-args">()</span>
|
131
131
|
</a>
|
132
132
|
</div>
|
@@ -137,46 +137,46 @@ Allows nested storage of variable names and values.
|
|
137
137
|
|
138
138
|
<h3 class="section-bar">Public Instance methods</h3>
|
139
139
|
|
140
|
-
<div id="method-
|
141
|
-
<a name="
|
140
|
+
<div id="method-M000036" class="method-detail">
|
141
|
+
<a name="M000036"></a>
|
142
142
|
|
143
143
|
<div class="method-heading">
|
144
|
-
<a href="Namespace.src/
|
145
|
-
onclick="popupCode('Namespace.src/
|
144
|
+
<a href="Namespace.src/M000036.html" target="Code" class="method-signature"
|
145
|
+
onclick="popupCode('Namespace.src/M000036.html');return false;">
|
146
146
|
<span class="method-name">[]</span><span class="method-args">(key)</span>
|
147
147
|
</a>
|
148
148
|
</div>
|
149
149
|
|
150
150
|
<div class="method-description">
|
151
151
|
<p>
|
152
|
-
An alias for <a href="Namespace.html#
|
152
|
+
An alias for <a href="Namespace.html#M000038">Namespace#get</a>(key)
|
153
153
|
</p>
|
154
154
|
</div>
|
155
155
|
</div>
|
156
156
|
|
157
|
-
<div id="method-
|
158
|
-
<a name="
|
157
|
+
<div id="method-M000035" class="method-detail">
|
158
|
+
<a name="M000035"></a>
|
159
159
|
|
160
160
|
<div class="method-heading">
|
161
|
-
<a href="Namespace.src/
|
162
|
-
onclick="popupCode('Namespace.src/
|
161
|
+
<a href="Namespace.src/M000035.html" target="Code" class="method-signature"
|
162
|
+
onclick="popupCode('Namespace.src/M000035.html');return false;">
|
163
163
|
<span class="method-name">[]=</span><span class="method-args">(key, value)</span>
|
164
164
|
</a>
|
165
165
|
</div>
|
166
166
|
|
167
167
|
<div class="method-description">
|
168
168
|
<p>
|
169
|
-
An alias for <a href="Namespace.html#
|
169
|
+
An alias for <a href="Namespace.html#M000037">Namespace#set</a>(key, value)
|
170
170
|
</p>
|
171
171
|
</div>
|
172
172
|
</div>
|
173
173
|
|
174
|
-
<div id="method-
|
175
|
-
<a name="
|
174
|
+
<div id="method-M000038" class="method-detail">
|
175
|
+
<a name="M000038"></a>
|
176
176
|
|
177
177
|
<div class="method-heading">
|
178
|
-
<a href="Namespace.src/
|
179
|
-
onclick="popupCode('Namespace.src/
|
178
|
+
<a href="Namespace.src/M000038.html" target="Code" class="method-signature"
|
179
|
+
onclick="popupCode('Namespace.src/M000038.html');return false;">
|
180
180
|
<span class="method-name">get</span><span class="method-args">(key)</span>
|
181
181
|
</a>
|
182
182
|
</div>
|
@@ -207,12 +207,12 @@ the key in the global namespace.
|
|
207
207
|
</div>
|
208
208
|
</div>
|
209
209
|
|
210
|
-
<div id="method-
|
211
|
-
<a name="
|
210
|
+
<div id="method-M000041" class="method-detail">
|
211
|
+
<a name="M000041"></a>
|
212
212
|
|
213
213
|
<div class="method-heading">
|
214
|
-
<a href="Namespace.src/
|
215
|
-
onclick="popupCode('Namespace.src/
|
214
|
+
<a href="Namespace.src/M000041.html" target="Code" class="method-signature"
|
215
|
+
onclick="popupCode('Namespace.src/M000041.html');return false;">
|
216
216
|
<span class="method-name">pop</span><span class="method-args">()</span>
|
217
217
|
</a>
|
218
218
|
</div>
|
@@ -227,12 +227,12 @@ Returns nil if there are no more namespaces to pop
|
|
227
227
|
</div>
|
228
228
|
</div>
|
229
229
|
|
230
|
-
<div id="method-
|
231
|
-
<a name="
|
230
|
+
<div id="method-M000040" class="method-detail">
|
231
|
+
<a name="M000040"></a>
|
232
232
|
|
233
233
|
<div class="method-heading">
|
234
|
-
<a href="Namespace.src/
|
235
|
-
onclick="popupCode('Namespace.src/
|
234
|
+
<a href="Namespace.src/M000040.html" target="Code" class="method-signature"
|
235
|
+
onclick="popupCode('Namespace.src/M000040.html');return false;">
|
236
236
|
<span class="method-name">push</span><span class="method-args">(namespace)</span>
|
237
237
|
</a>
|
238
238
|
</div>
|
@@ -245,12 +245,12 @@ of names.
|
|
245
245
|
</div>
|
246
246
|
</div>
|
247
247
|
|
248
|
-
<div id="method-
|
249
|
-
<a name="
|
248
|
+
<div id="method-M000037" class="method-detail">
|
249
|
+
<a name="M000037"></a>
|
250
250
|
|
251
251
|
<div class="method-heading">
|
252
|
-
<a href="Namespace.src/
|
253
|
-
onclick="popupCode('Namespace.src/
|
252
|
+
<a href="Namespace.src/M000037.html" target="Code" class="method-signature"
|
253
|
+
onclick="popupCode('Namespace.src/M000037.html');return false;">
|
254
254
|
<span class="method-name">set</span><span class="method-args">(key, value)</span>
|
255
255
|
</a>
|
256
256
|
</div>
|
@@ -263,12 +263,12 @@ namespace.
|
|
263
263
|
</div>
|
264
264
|
</div>
|
265
265
|
|
266
|
-
<div id="method-
|
267
|
-
<a name="
|
266
|
+
<div id="method-M000039" class="method-detail">
|
267
|
+
<a name="M000039"></a>
|
268
268
|
|
269
269
|
<div class="method-heading">
|
270
|
-
<a href="Namespace.src/
|
271
|
-
onclick="popupCode('Namespace.src/
|
270
|
+
<a href="Namespace.src/M000039.html" target="Code" class="method-signature"
|
271
|
+
onclick="popupCode('Namespace.src/M000039.html');return false;">
|
272
272
|
<span class="method-name">true?</span><span class="method-args">(flag)</span>
|
273
273
|
</a>
|
274
274
|
</div>
|
@@ -5,15 +5,15 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>new (Namespace)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
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
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">
|
15
|
-
<span class="ruby-
|
16
|
-
<span class="ruby-ivar">@
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/PageTemplate.rb, line 20</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>()
|
15
|
+
<span class="ruby-ivar">@global</span> = {}
|
16
|
+
<span class="ruby-ivar">@nSpaces</span> = []
|
17
17
|
<span class="ruby-keyword kw">end</span></pre>
|
18
18
|
</body>
|
19
19
|
</html>
|
@@ -5,32 +5,14 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>[]= (Namespace)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
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
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-
|
15
|
-
<span class="ruby-identifier">
|
16
|
-
|
17
|
-
<span class="ruby-ivar">@nSpaces</span>.<span class="ruby-identifier">reverse</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">ns</span><span class="ruby-operator">|</span>
|
18
|
-
|
19
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">ns</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">method_defined?</span>(<span class="ruby-node">":#{key}"</span>)
|
20
|
-
<span class="ruby-identifier">value</span> = <span class="ruby-identifier">ns</span>.<span class="ruby-identifier">send</span>(<span class="ruby-node">":#{key}"</span>)
|
21
|
-
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">ns</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">method_defined?</span>(<span class="ruby-node">"#{key}"</span>)
|
22
|
-
<span class="ruby-identifier">value</span> = <span class="ruby-identifier">ns</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">key</span>)
|
23
|
-
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">ns</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">method_defined?</span>(<span class="ruby-value str">"[]"</span>)
|
24
|
-
<span class="ruby-identifier">value</span> = <span class="ruby-identifier">ns</span>[<span class="ruby-identifier">key</span>]
|
25
|
-
<span class="ruby-keyword kw">end</span>
|
26
|
-
|
27
|
-
<span class="ruby-keyword kw">break</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">value</span>
|
28
|
-
<span class="ruby-keyword kw">end</span>
|
29
|
-
|
30
|
-
<span class="ruby-identifier">value</span> = <span class="ruby-ivar">@global</span>[<span class="ruby-identifier">key</span>] <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">value</span>
|
31
|
-
<span class="ruby-identifier">puts</span> <span class="ruby-node">"Namespace #{key}: #{value}"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">$DEBUG</span>
|
32
|
-
|
33
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">value</span>
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/PageTemplate.rb, line 26</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-operator">[]=</span>(<span class="ruby-identifier">key</span>, <span class="ruby-identifier">value</span>)
|
15
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">set</span>(<span class="ruby-identifier">key</span>, <span class="ruby-identifier">value</span>)
|
34
16
|
<span class="ruby-keyword kw">end</span></pre>
|
35
17
|
</body>
|
36
18
|
</html>
|
@@ -5,17 +5,14 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>[] (Namespace)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
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
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-
|
15
|
-
<span class="ruby-
|
16
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">value</span>
|
17
|
-
|
18
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">value</span>
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/PageTemplate.rb, line 31</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-operator">[]</span>(<span class="ruby-identifier">key</span>)
|
15
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">key</span>)
|
19
16
|
<span class="ruby-keyword kw">end</span></pre>
|
20
17
|
</body>
|
21
18
|
</html>
|