gerbil 1.1.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -55,5 +55,6 @@ require 'rake/gempackagetask'
55
55
  # utility
56
56
  desc 'Upload to project website.'
57
57
  task :upload => :doc do
58
- sh 'rsync -av doc/ ~/www/lib/gerbil'
58
+ sh "rsync -av doc/ ~/www/lib/#{spec.name}"
59
+ sh "rsync -av doc/api/ ~/www/lib/#{spec.name}/api/ --delete"
59
60
  end
data/bin/gerbil CHANGED
@@ -251,10 +251,10 @@ if __FILE__ == $0 or File.basename(__FILE__) == File.basename($0)
251
251
 
252
252
  # replace node with output
253
253
  if nodeDefs[n.type]['silent']
254
- buf.sub! n.digest, ''
254
+ buf[n.digest] = ''
255
255
  buf = n.output
256
256
  else
257
- buf.sub! n.digest, n.output
257
+ buf[n.digest] = n.output
258
258
  end
259
259
 
260
260
  # repeat for all child nodes
@@ -76,14 +76,6 @@
76
76
 
77
77
  </div>
78
78
 
79
- <div id="method-list">
80
- <h3 class="section-bar">Methods</h3>
81
-
82
- <div class="name-list">
83
- <a href="#M000005">gen_method_infos</a>&nbsp;&nbsp;
84
- <a href="#M000004">gen_parse_trees</a>&nbsp;&nbsp;
85
- </div>
86
- </div>
87
79
 
88
80
  </div>
89
81
 
@@ -95,9 +87,8 @@
95
87
  <div id="class-list">
96
88
  <h3 class="section-bar">Classes and Modules</h3>
97
89
 
98
- Module <a href="RDoc/DummyMixin.html" class="link">RDoc::DummyMixin</a><br />
99
- Class <a href="RDoc/DummyMarkup.html" class="link">RDoc::DummyMarkup</a><br />
100
- Class <a href="RDoc/DummyOptions.html" class="link">RDoc::DummyOptions</a><br />
90
+ Class <a href="RDoc/AnyMethod.html" class="link">RDoc::AnyMethod</a><br />
91
+ Class <a href="RDoc/TopLevel.html" class="link">RDoc::TopLevel</a><br />
101
92
 
102
93
  </div>
103
94
 
@@ -108,49 +99,6 @@ Class <a href="RDoc/DummyOptions.html" class="link">RDoc::DummyOptions</a><br />
108
99
 
109
100
 
110
101
  <!-- if method_list -->
111
- <div id="methods">
112
- <h3 class="section-bar">Public Class methods</h3>
113
-
114
- <div id="method-M000005" class="method-detail">
115
- <a name="M000005"></a>
116
-
117
- <div class="method-heading">
118
- <a href="RDoc.src/M000005.html" target="Code" class="method-signature"
119
- onclick="popupCode('RDoc.src/M000005.html');return false;">
120
- <span class="method-name">gen_method_infos</span><span class="method-args">(*aParseTrees)</span>
121
- </a>
122
- </div>
123
-
124
- <div class="method-description">
125
- <p>
126
- Returns an array of hashes describing all methods present in the given
127
- parse trees (which are produced by RDoc::gen_parse_trees).
128
- </p>
129
- </div>
130
- </div>
131
-
132
- <div id="method-M000004" class="method-detail">
133
- <a name="M000004"></a>
134
-
135
- <div class="method-heading">
136
- <a href="RDoc.src/M000004.html" target="Code" class="method-signature"
137
- onclick="popupCode('RDoc.src/M000004.html');return false;">
138
- <span class="method-name">gen_parse_trees</span><span class="method-args">(aCode, aFileName = __FILE__)</span>
139
- </a>
140
- </div>
141
-
142
- <div class="method-description">
143
- <p>
144
- Returns an array of <a href="RDoc.html">RDoc</a> parse trees for the given
145
- code. If the file name (which signifies the origin of the given code) is
146
- given, it MUST have a &quot;.rb&quot; file extension. Otherwise, <a
147
- href="RDoc.html">RDoc</a> will give you an empty parse tree! :-(
148
- </p>
149
- </div>
150
- </div>
151
-
152
-
153
- </div>
154
102
 
155
103
 
156
104
  </div>
@@ -5,7 +5,7 @@
5
5
 
6
6
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
7
  <head>
8
- <title>Class: RDoc::DummyOptions</title>
8
+ <title>Class: RDoc::AnyMethod</title>
9
9
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
10
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
11
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
@@ -50,7 +50,7 @@
50
50
  <table class="header-table">
51
51
  <tr class="top-aligned-row">
52
52
  <td><strong>Class</strong></td>
53
- <td class="class-name-in-header">RDoc::DummyOptions</td>
53
+ <td class="class-name-in-header">RDoc::AnyMethod</td>
54
54
  </tr>
55
55
  <tr class="top-aligned-row">
56
56
  <td><strong>In:</strong></td>
@@ -86,7 +86,10 @@
86
86
  <h3 class="section-bar">Methods</h3>
87
87
 
88
88
  <div class="name-list">
89
- <a href="#M000007">quiet</a>&nbsp;&nbsp;
89
+ <a href="#M000006">comment_html</a>&nbsp;&nbsp;
90
+ <a href="#M000005">decl</a>&nbsp;&nbsp;
91
+ <a href="#M000004">full_name</a>&nbsp;&nbsp;
92
+ <a href="#M000007">top_level</a>&nbsp;&nbsp;
90
93
  </div>
91
94
  </div>
92
95
 
@@ -94,13 +97,6 @@
94
97
 
95
98
 
96
99
  <!-- if includes -->
97
- <div id="includes">
98
- <h3 class="section-bar">Included Modules</h3>
99
-
100
- <div id="includes-list">
101
- <span class="include-name"><a href="DummyMixin.html">DummyMixin</a></span>
102
- </div>
103
- </div>
104
100
 
105
101
  <div id="section">
106
102
 
@@ -115,17 +111,72 @@
115
111
  <div id="methods">
116
112
  <h3 class="section-bar">Public Instance methods</h3>
117
113
 
114
+ <div id="method-M000006" class="method-detail">
115
+ <a name="M000006"></a>
116
+
117
+ <div class="method-heading">
118
+ <a href="AnyMethod.src/M000006.html" target="Code" class="method-signature"
119
+ onclick="popupCode('AnyMethod.src/M000006.html');return false;">
120
+ <span class="method-name">comment_html</span><span class="method-args">()</span>
121
+ </a>
122
+ </div>
123
+
124
+ <div class="method-description">
125
+ <p>
126
+ Returns a HTML version of this method&#8216;s comment.
127
+ </p>
128
+ </div>
129
+ </div>
130
+
131
+ <div id="method-M000005" class="method-detail">
132
+ <a name="M000005"></a>
133
+
134
+ <div class="method-heading">
135
+ <a href="AnyMethod.src/M000005.html" target="Code" class="method-signature"
136
+ onclick="popupCode('AnyMethod.src/M000005.html');return false;">
137
+ <span class="method-name">decl</span><span class="method-args">()</span>
138
+ </a>
139
+ </div>
140
+
141
+ <div class="method-description">
142
+ <p>
143
+ Returns a complete method declaration with block parameters and all.
144
+ </p>
145
+ </div>
146
+ </div>
147
+
148
+ <div id="method-M000004" class="method-detail">
149
+ <a name="M000004"></a>
150
+
151
+ <div class="method-heading">
152
+ <a href="AnyMethod.src/M000004.html" target="Code" class="method-signature"
153
+ onclick="popupCode('AnyMethod.src/M000004.html');return false;">
154
+ <span class="method-name">full_name</span><span class="method-args">()</span>
155
+ </a>
156
+ </div>
157
+
158
+ <div class="method-description">
159
+ <p>
160
+ Returns the fully qualified name of this method.
161
+ </p>
162
+ </div>
163
+ </div>
164
+
118
165
  <div id="method-M000007" class="method-detail">
119
166
  <a name="M000007"></a>
120
167
 
121
168
  <div class="method-heading">
122
- <a href="DummyOptions.src/M000007.html" target="Code" class="method-signature"
123
- onclick="popupCode('DummyOptions.src/M000007.html');return false;">
124
- <span class="method-name">quiet</span><span class="method-args">(</span>
169
+ <a href="AnyMethod.src/M000007.html" target="Code" class="method-signature"
170
+ onclick="popupCode('AnyMethod.src/M000007.html');return false;">
171
+ <span class="method-name">top_level</span><span class="method-args">()</span>
125
172
  </a>
126
173
  </div>
127
174
 
128
175
  <div class="method-description">
176
+ <p>
177
+ Returns the <a href="TopLevel.html">RDoc::TopLevel</a> object which
178
+ contains this method.
179
+ </p>
129
180
  </div>
130
181
  </div>
131
182
 
@@ -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>full_name (RDoc::AnyMethod)</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/gerbil/rdoc.rb, line 79</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">full_name</span>
15
+ [<span class="ruby-identifier">parent</span>.<span class="ruby-identifier">full_name</span>, <span class="ruby-identifier">name</span>].<span class="ruby-identifier">join</span>(<span class="ruby-identifier">singleton</span> <span class="ruby-value">? </span><span class="ruby-value str">'::'</span> <span class="ruby-operator">:</span> <span class="ruby-value str">'#'</span>)
16
+ <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -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>decl (RDoc::AnyMethod)</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/gerbil/rdoc.rb, line 84</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">decl</span>
15
+ <span class="ruby-identifier">a</span> = <span class="ruby-identifier">params</span>.<span class="ruby-identifier">dup</span>
16
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">b</span> = <span class="ruby-identifier">block_params</span>
17
+ <span class="ruby-identifier">a</span>.<span class="ruby-identifier">sub!</span> <span class="ruby-regexp re">%r/\s*\#.*(?=.$)/</span>, <span class="ruby-value str">''</span> <span class="ruby-comment cmt"># remove &quot;# :yields: ...&quot; string</span>
18
+ <span class="ruby-identifier">a</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot; {|#{b}| ... }&quot;</span>
19
+ <span class="ruby-keyword kw">end</span>
20
+ <span class="ruby-identifier">full_name</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">a</span>
21
+ <span class="ruby-keyword kw">end</span></pre>
22
+ </body>
23
+ </html>
@@ -5,14 +5,14 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>method_missing (RDoc::DummyMixin)</title>
8
+ <title>comment_html (RDoc::AnyMethod)</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/gerbil/rdoc.rb, line 10</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">method_missing</span> <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>
15
- <span class="ruby-comment cmt"># ignore all messages</span>
13
+ <pre><span class="ruby-comment cmt"># File lib/gerbil/rdoc.rb, line 94</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">comment_html</span>
15
+ <span class="ruby-constant">DummyMarkup</span>.<span class="ruby-identifier">new</span>.<span class="ruby-identifier">markup</span> <span class="ruby-identifier">comment</span>
16
16
  <span class="ruby-keyword kw">end</span></pre>
17
17
  </body>
18
18
  </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>top_level (RDoc::AnyMethod)</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/gerbil/rdoc.rb, line 99</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">top_level</span>
15
+ <span class="ruby-identifier">n</span> = <span class="ruby-identifier">parent</span>
16
+ <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">n</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">n</span>.<span class="ruby-identifier">parent</span>
17
+ <span class="ruby-identifier">n</span> = <span class="ruby-identifier">n</span>.<span class="ruby-identifier">parent</span>
18
+ <span class="ruby-keyword kw">end</span>
19
+ <span class="ruby-identifier">n</span>
20
+ <span class="ruby-keyword kw">end</span></pre>
21
+ </body>
22
+ </html>
@@ -0,0 +1,250 @@
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: RDoc::TopLevel</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">RDoc::TopLevel</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/lib/gerbil/rdoc_rb.html">
59
+ lib/gerbil/rdoc.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
+
82
+
83
+ </div>
84
+
85
+ <div id="method-list">
86
+ <h3 class="section-bar">Methods</h3>
87
+
88
+ <div class="name-list">
89
+ <a href="#M000008">all_classes</a>&nbsp;&nbsp;
90
+ <a href="#M000010">all_methods</a>&nbsp;&nbsp;
91
+ <a href="#M000009">all_modules</a>&nbsp;&nbsp;
92
+ <a href="#M000012">parse</a>&nbsp;&nbsp;
93
+ <a href="#M000013">parse_file</a>&nbsp;&nbsp;
94
+ <a href="#M000011">refresh_all_classes_and_modules</a>&nbsp;&nbsp;
95
+ </div>
96
+ </div>
97
+
98
+ </div>
99
+
100
+
101
+ <!-- if includes -->
102
+
103
+ <div id="section">
104
+
105
+
106
+
107
+
108
+
109
+
110
+
111
+
112
+ <!-- if method_list -->
113
+ <div id="methods">
114
+ <h3 class="section-bar">Public Class methods</h3>
115
+
116
+ <div id="method-M000008" class="method-detail">
117
+ <a name="M000008"></a>
118
+
119
+ <div class="method-heading">
120
+ <a href="TopLevel.src/M000008.html" target="Code" class="method-signature"
121
+ onclick="popupCode('TopLevel.src/M000008.html');return false;">
122
+ <span class="method-name">all_classes</span><span class="method-args">()</span>
123
+ </a>
124
+ </div>
125
+
126
+ <div class="method-description">
127
+ <p>
128
+ Returns an array of all classes recorded thus far.
129
+ </p>
130
+ </div>
131
+ </div>
132
+
133
+ <div id="method-M000010" class="method-detail">
134
+ <a name="M000010"></a>
135
+
136
+ <div class="method-heading">
137
+ <a href="TopLevel.src/M000010.html" target="Code" class="method-signature"
138
+ onclick="popupCode('TopLevel.src/M000010.html');return false;">
139
+ <span class="method-name">all_methods</span><span class="method-args">()</span>
140
+ </a>
141
+ </div>
142
+
143
+ <div class="method-description">
144
+ <p>
145
+ Returns an array of <a href="AnyMethod.html">RDoc::AnyMethod</a> objects
146
+ representing all methods recorded thus far.
147
+ </p>
148
+ </div>
149
+ </div>
150
+
151
+ <div id="method-M000009" class="method-detail">
152
+ <a name="M000009"></a>
153
+
154
+ <div class="method-heading">
155
+ <a href="TopLevel.src/M000009.html" target="Code" class="method-signature"
156
+ onclick="popupCode('TopLevel.src/M000009.html');return false;">
157
+ <span class="method-name">all_modules</span><span class="method-args">()</span>
158
+ </a>
159
+ </div>
160
+
161
+ <div class="method-description">
162
+ <p>
163
+ Returns an array of all modules recorded thus far.
164
+ </p>
165
+ </div>
166
+ </div>
167
+
168
+ <div id="method-M000012" class="method-detail">
169
+ <a name="M000012"></a>
170
+
171
+ <div class="method-heading">
172
+ <a href="TopLevel.src/M000012.html" target="Code" class="method-signature"
173
+ onclick="popupCode('TopLevel.src/M000012.html');return false;">
174
+ <span class="method-name">parse</span><span class="method-args">(aCodeString, aFileName = __FILE__)</span>
175
+ </a>
176
+ </div>
177
+
178
+ <div class="method-description">
179
+ <p>
180
+ Returns a <a href="TopLevel.html">RDoc::TopLevel</a> object containing
181
+ information parsed from the given code string. This information is also
182
+ added to the global <a href="TopLevel.html">TopLevel</a> class state, so
183
+ you can access it via the class methods of the <a
184
+ href="TopLevel.html">TopLevel</a> class.
185
+ </p>
186
+ <p>
187
+ If the file name (which signifies the origin of the given code) is given,
188
+ it MUST have a &quot;.c&quot; or &quot;.rb&quot; file extension. Otherwise,
189
+ <a href="../RDoc.html">RDoc</a> will ignore the given code string! :-(
190
+ </p>
191
+ </div>
192
+ </div>
193
+
194
+ <div id="method-M000013" class="method-detail">
195
+ <a name="M000013"></a>
196
+
197
+ <div class="method-heading">
198
+ <a href="TopLevel.src/M000013.html" target="Code" class="method-signature"
199
+ onclick="popupCode('TopLevel.src/M000013.html');return false;">
200
+ <span class="method-name">parse_file</span><span class="method-args">(aFileName)</span>
201
+ </a>
202
+ </div>
203
+
204
+ <div class="method-description">
205
+ <p>
206
+ Returns a <a href="TopLevel.html">RDoc::TopLevel</a> object containing
207
+ information parsed from the code in the given file. This information is
208
+ also added to the global <a href="TopLevel.html">TopLevel</a> class state,
209
+ so you can access it via the class methods of the <a
210
+ href="TopLevel.html">TopLevel</a> class.
211
+ </p>
212
+ <p>
213
+ The given file name MUST have a &quot;.c&quot; or &quot;.rb&quot; file
214
+ extension. Otherwise, <a href="../RDoc.html">RDoc</a> will ignore the file!
215
+ :-(
216
+ </p>
217
+ </div>
218
+ </div>
219
+
220
+ <div id="method-M000011" class="method-detail">
221
+ <a name="M000011"></a>
222
+
223
+ <div class="method-heading">
224
+ <a href="TopLevel.src/M000011.html" target="Code" class="method-signature"
225
+ onclick="popupCode('TopLevel.src/M000011.html');return false;">
226
+ <span class="method-name">refresh_all_classes_and_modules</span><span class="method-args">()</span>
227
+ </a>
228
+ </div>
229
+
230
+ <div class="method-description">
231
+ <p>
232
+ Update the return value of the all_classes_and_modules() method to
233
+ <b>really</b> include every class and every module seen thus far.
234
+ </p>
235
+ </div>
236
+ </div>
237
+
238
+
239
+ </div>
240
+
241
+
242
+ </div>
243
+
244
+
245
+ <div id="validator-badges">
246
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
247
+ </div>
248
+
249
+ </body>
250
+ </html>