erbook 6.1.0 → 7.0.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/bin/erbook +29 -25
- data/doc/HelloWorld.spec +3 -1
- data/doc/api/classes/ERBook.html +86 -0
- data/doc/api/classes/ERBook/Document.html +399 -0
- data/doc/api/classes/ERBook/Document/Node.html +110 -0
- data/doc/api/classes/ERBook/Template.html +309 -0
- data/doc/api/classes/ERBook/Template/Sandbox.html +134 -0
- data/doc/api/classes/RDoc.html +69 -0
- data/doc/api/classes/RDoc/AnyMethod.html +249 -0
- data/doc/api/classes/RDoc/DummyMarkup.html +60 -0
- data/doc/api/classes/RDoc/DummyMixin.html +54 -0
- data/doc/api/classes/RDoc/DummyOptions.html +60 -0
- data/doc/api/classes/RDoc/TopLevel.html +344 -0
- data/doc/api/classes/String.html +212 -0
- data/doc/api/created.rid +1 -0
- data/doc/api/css/main.css +263 -0
- data/doc/api/css/panel.css +383 -0
- data/doc/api/css/reset.css +53 -0
- data/doc/api/files/ANN_eml.html +276 -0
- data/doc/api/files/ANN_html.html +407 -0
- data/doc/api/files/ANN_txt.html +271 -0
- data/doc/api/files/LICENSE.html +76 -0
- data/doc/api/files/lib/erbook/document_rb.html +74 -0
- data/doc/api/files/lib/erbook/rdoc_rb.html +77 -0
- data/doc/api/files/lib/erbook/template_rb.html +66 -0
- data/doc/api/files/lib/erbook/to_xhtml_rb.html +89 -0
- data/doc/api/files/lib/erbook_rb.html +70 -0
- data/doc/api/i/arrows.png +0 -0
- data/doc/api/i/results_bg.png +0 -0
- data/doc/api/i/tree_bg.png +0 -0
- data/doc/api/index.html +14 -18
- data/doc/api/js/jquery-1.3.2.min.js +19 -0
- data/doc/api/js/jquery-effect.js +593 -0
- data/doc/api/js/main.js +22 -0
- data/doc/api/js/searchdoc.js +605 -0
- data/doc/api/panel/index.html +63 -0
- data/doc/api/panel/search_index.js +1 -0
- data/doc/api/panel/tree.js +1 -0
- data/doc/formats.erb +63 -115
- data/doc/history.erb +125 -92
- data/doc/index.erb +12 -7
- data/doc/index.xhtml +1020 -1347
- data/doc/intro.erb +42 -40
- data/doc/setup.erb +18 -18
- data/doc/theory.erb +24 -31
- data/doc/usage.erb +14 -24
- data/fmt/xhtml.icons/index.yaml +16 -14
- data/fmt/xhtml.icons/rakefile +33 -0
- data/fmt/xhtml.icons/tango-icon-theme-0.8.90/16x16/places/start-here.png +0 -0
- data/fmt/xhtml.icons/tango-icon-theme-0.8.90/32x32/actions/go-down.png +0 -0
- data/fmt/xhtml.icons/tango-icon-theme-0.8.90/32x32/actions/go-up.png +0 -0
- data/fmt/xhtml.icons/tango-icon-theme-0.8.90/32x32/places/start-here.png +0 -0
- data/fmt/xhtml.icons/tango-icon-theme-0.8.90/32x32/status/software-update-available.png +0 -0
- data/fmt/xhtml.icons/{tango-icon-theme-0.8.1 → tango-icon-theme-0.8.90}/48x48/apps/accessories-text-editor.png +0 -0
- data/fmt/xhtml.icons/tango-icon-theme-0.8.90/48x48/apps/internet-group-chat.png +0 -0
- data/fmt/xhtml.icons/{tango-icon-theme-0.8.1 → tango-icon-theme-0.8.90}/48x48/emblems/emblem-important.png +0 -0
- data/fmt/xhtml.icons/{tango-icon-theme-0.8.1 → tango-icon-theme-0.8.90}/48x48/status/dialog-error.png +0 -0
- data/fmt/xhtml.icons/{tango-icon-theme-0.8.1 → tango-icon-theme-0.8.90}/48x48/status/dialog-information.png +0 -0
- data/fmt/xhtml.icons/{tango-icon-theme-0.8.1 → tango-icon-theme-0.8.90}/48x48/status/dialog-warning.png +0 -0
- data/fmt/xhtml.icons/tango-icon-theme-0.8.90/COPYING +1 -0
- data/fmt/xhtml.icons/{tango-icon-theme-0.8.1 → tango-icon-theme-0.8.90}/README +0 -0
- data/fmt/xhtml.icons/tango-icon-theme-0.8.90/scalable/actions/bookmark-new.svg +672 -0
- data/fmt/xhtml.icons/tango-icon-theme-0.8.90/scalable/actions/go-down.svg +200 -0
- data/fmt/xhtml.icons/tango-icon-theme-0.8.90/scalable/actions/go-home.svg +445 -0
- data/fmt/xhtml.icons/tango-icon-theme-0.8.90/scalable/actions/go-up.svg +196 -0
- data/fmt/xhtml.icons/tango-icon-theme-0.8.90/scalable/actions/view-refresh.svg +393 -0
- data/fmt/xhtml.icons/tango-icon-theme-0.8.90/scalable/apps/accessories-text-editor.svg +554 -0
- data/fmt/xhtml.icons/tango-icon-theme-0.8.90/scalable/apps/internet-group-chat.svg +312 -0
- data/fmt/xhtml.icons/tango-icon-theme-0.8.90/scalable/emblems/emblem-favorite.svg +242 -0
- data/fmt/xhtml.icons/tango-icon-theme-0.8.90/scalable/emblems/emblem-important.svg +164 -0
- data/fmt/xhtml.icons/tango-icon-theme-0.8.90/scalable/mimetypes/application-certificate.svg +443 -0
- data/fmt/xhtml.icons/tango-icon-theme-0.8.90/scalable/places/start-here.svg +492 -0
- data/fmt/xhtml.icons/tango-icon-theme-0.8.90/scalable/status/dialog-error.svg +330 -0
- data/fmt/xhtml.icons/tango-icon-theme-0.8.90/scalable/status/dialog-information.svg +1159 -0
- data/fmt/xhtml.icons/tango-icon-theme-0.8.90/scalable/status/dialog-warning.svg +373 -0
- data/fmt/xhtml.icons/tango-icon-theme-0.8.90/scalable/status/software-update-available.svg +209 -0
- data/fmt/xhtml.scripts/jquery-1.3.2.min.js +19 -0
- data/fmt/xhtml.scripts/jquery.localscroll-1.2.7-min.js +9 -0
- data/fmt/xhtml.scripts/jquery.scrollTo-1.4.1-min.js +11 -0
- data/fmt/xhtml.yaml +470 -454
- data/lang/de.yaml +5 -5
- data/lang/el.yaml +4 -4
- data/lang/es.yaml +5 -5
- data/lang/fr.yaml +5 -5
- data/lang/it.yaml +5 -5
- data/lang/ja.yaml +4 -4
- data/lang/ko.yaml +4 -4
- data/lang/nl.yaml +4 -4
- data/lang/phrases.yaml +4 -4
- data/lang/pt.yaml +5 -5
- data/lang/ru.yaml +5 -5
- data/lang/zh.yaml +5 -5
- data/lang/zt.yaml +5 -5
- data/lib/erbook.rb +12 -5
- data/lib/erbook/document.rb +127 -107
- data/lib/erbook/rdoc.rb +18 -11
- data/lib/erbook/template.rb +86 -176
- data/lib/erbook/to_xhtml.rb +98 -25
- data/{Rakefile → rakefile} +1 -0
- metadata +106 -53
- data/doc/api/ERBook.html +0 -35
- data/doc/api/ERBook/Document.html +0 -669
- data/doc/api/ERBook/Document/Node.html +0 -102
- data/doc/api/ERBook/Template.html +0 -670
- data/doc/api/RDoc.html +0 -23
- data/doc/api/RDoc/AnyMethod.html +0 -302
- data/doc/api/RDoc/DummyMarkup.html +0 -73
- data/doc/api/RDoc/DummyMixin.html +0 -23
- data/doc/api/RDoc/DummyOptions.html +0 -140
- data/doc/api/RDoc/TopLevel.html +0 -465
- data/doc/api/String.html +0 -372
- data/doc/api/all-methods.html +0 -253
- data/doc/api/all-namespaces.html +0 -42
- data/doc/api/app.js +0 -18
- data/doc/api/jquery.js +0 -11
- data/doc/api/readme.html +0 -38
- data/doc/api/style.css +0 -68
- data/doc/api/syntax_highlight.css +0 -21
- data/fmt/xhtml.icons/tango-icon-theme-0.8.1/48x48/README +0 -2
- data/fmt/xhtml.icons/tango-icon-theme-0.8.1/48x48/apps/internet-group-chat.png +0 -0
- data/fmt/xhtml.icons/tango-icon-theme-0.8.1/COPYING +0 -67
|
@@ -0,0 +1,344 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
3
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
4
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
5
|
+
<head>
|
|
6
|
+
<title>RDoc::TopLevel</title>
|
|
7
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
8
|
+
<link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" />
|
|
9
|
+
<link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" />
|
|
10
|
+
<script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
|
|
11
|
+
<script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script>
|
|
12
|
+
<script src="../../js/main.js" type="text/javascript" charset="utf-8"></script>
|
|
13
|
+
</head>
|
|
14
|
+
|
|
15
|
+
<body>
|
|
16
|
+
<div class="banner">
|
|
17
|
+
<h1>
|
|
18
|
+
<span class="type">Class</span>
|
|
19
|
+
RDoc::TopLevel
|
|
20
|
+
|
|
21
|
+
<span class="parent"><
|
|
22
|
+
|
|
23
|
+
Object
|
|
24
|
+
|
|
25
|
+
</span>
|
|
26
|
+
|
|
27
|
+
</h1>
|
|
28
|
+
<ul class="files">
|
|
29
|
+
|
|
30
|
+
<li><a href="../../files/lib/erbook/rdoc_rb.html">lib/erbook/rdoc.rb</a></li>
|
|
31
|
+
|
|
32
|
+
</ul>
|
|
33
|
+
</div>
|
|
34
|
+
<div id="bodyContent">
|
|
35
|
+
<div id="content">
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
<div class="sectiontitle">Methods</div>
|
|
46
|
+
<dl class="methods">
|
|
47
|
+
|
|
48
|
+
<dt>A</dt>
|
|
49
|
+
<dd>
|
|
50
|
+
<ul>
|
|
51
|
+
|
|
52
|
+
<li><a href="#M000045">all_classes</a>,</li>
|
|
53
|
+
|
|
54
|
+
<li><a href="#M000047">all_methods</a>,</li>
|
|
55
|
+
|
|
56
|
+
<li><a href="#M000046">all_modules</a></li>
|
|
57
|
+
|
|
58
|
+
</ul>
|
|
59
|
+
</dd>
|
|
60
|
+
|
|
61
|
+
<dt>P</dt>
|
|
62
|
+
<dd>
|
|
63
|
+
<ul>
|
|
64
|
+
|
|
65
|
+
<li><a href="#M000049">parse</a>,</li>
|
|
66
|
+
|
|
67
|
+
<li><a href="#M000050">parse_file</a></li>
|
|
68
|
+
|
|
69
|
+
</ul>
|
|
70
|
+
</dd>
|
|
71
|
+
|
|
72
|
+
<dt>R</dt>
|
|
73
|
+
<dd>
|
|
74
|
+
<ul>
|
|
75
|
+
|
|
76
|
+
<li><a href="#M000048">refresh_all_classes_and_modules</a></li>
|
|
77
|
+
|
|
78
|
+
</ul>
|
|
79
|
+
</dd>
|
|
80
|
+
|
|
81
|
+
</dl>
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
<div class="sectiontitle">Class Public methods</div>
|
|
96
|
+
|
|
97
|
+
<div class="method">
|
|
98
|
+
<div class="title" id="M000045">
|
|
99
|
+
|
|
100
|
+
<a name="M000045"></a><b>all_classes</b>()
|
|
101
|
+
|
|
102
|
+
</div>
|
|
103
|
+
|
|
104
|
+
<div class="description">
|
|
105
|
+
<p>
|
|
106
|
+
Returns an array of all classes recorded thus far.
|
|
107
|
+
</p>
|
|
108
|
+
|
|
109
|
+
</div>
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
<div class="sourcecode">
|
|
115
|
+
<p class="source-link">
|
|
116
|
+
Source: <a href="javascript:toggleSource('M000045_source')" id="l_M000045_source">show</a>
|
|
117
|
+
|
|
118
|
+
| <a href="http://github.com/sunaku/erbook/blob/a096a4140d3d9ea230c89aba50526af5e4613f82/lib/erbook/rdoc.rb#L14" target="_blank" class="github_url">on GitHub</a>
|
|
119
|
+
|
|
120
|
+
</p>
|
|
121
|
+
<div id="M000045_source" class="dyn-source">
|
|
122
|
+
<pre><span class="ruby-comment cmt"># File lib/erbook/rdoc.rb, line 14</span>
|
|
123
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">all_classes</span>
|
|
124
|
+
<span class="ruby-ivar">@all_classes</span>.<span class="ruby-identifier">values</span>
|
|
125
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
126
|
+
</div>
|
|
127
|
+
</div>
|
|
128
|
+
|
|
129
|
+
</div>
|
|
130
|
+
|
|
131
|
+
<div class="method">
|
|
132
|
+
<div class="title" id="M000047">
|
|
133
|
+
|
|
134
|
+
<a name="M000047"></a><b>all_methods</b>()
|
|
135
|
+
|
|
136
|
+
</div>
|
|
137
|
+
|
|
138
|
+
<div class="description">
|
|
139
|
+
<p>
|
|
140
|
+
Returns an array of <a href="AnyMethod.html">RDoc::AnyMethod</a> objects
|
|
141
|
+
representing all methods recorded thus far.
|
|
142
|
+
</p>
|
|
143
|
+
|
|
144
|
+
</div>
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
<div class="sourcecode">
|
|
150
|
+
<p class="source-link">
|
|
151
|
+
Source: <a href="javascript:toggleSource('M000047_source')" id="l_M000047_source">show</a>
|
|
152
|
+
|
|
153
|
+
| <a href="http://github.com/sunaku/erbook/blob/a096a4140d3d9ea230c89aba50526af5e4613f82/lib/erbook/rdoc.rb#L25" target="_blank" class="github_url">on GitHub</a>
|
|
154
|
+
|
|
155
|
+
</p>
|
|
156
|
+
<div id="M000047_source" class="dyn-source">
|
|
157
|
+
<pre><span class="ruby-comment cmt"># File lib/erbook/rdoc.rb, line 25</span>
|
|
158
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">all_methods</span>
|
|
159
|
+
<span class="ruby-identifier">all_classes_and_modules</span>.<span class="ruby-identifier">map</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">method_list</span> }.<span class="ruby-identifier">flatten</span>
|
|
160
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
161
|
+
</div>
|
|
162
|
+
</div>
|
|
163
|
+
|
|
164
|
+
</div>
|
|
165
|
+
|
|
166
|
+
<div class="method">
|
|
167
|
+
<div class="title" id="M000046">
|
|
168
|
+
|
|
169
|
+
<a name="M000046"></a><b>all_modules</b>()
|
|
170
|
+
|
|
171
|
+
</div>
|
|
172
|
+
|
|
173
|
+
<div class="description">
|
|
174
|
+
<p>
|
|
175
|
+
Returns an array of all modules recorded thus far.
|
|
176
|
+
</p>
|
|
177
|
+
|
|
178
|
+
</div>
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
<div class="sourcecode">
|
|
184
|
+
<p class="source-link">
|
|
185
|
+
Source: <a href="javascript:toggleSource('M000046_source')" id="l_M000046_source">show</a>
|
|
186
|
+
|
|
187
|
+
| <a href="http://github.com/sunaku/erbook/blob/a096a4140d3d9ea230c89aba50526af5e4613f82/lib/erbook/rdoc.rb#L19" target="_blank" class="github_url">on GitHub</a>
|
|
188
|
+
|
|
189
|
+
</p>
|
|
190
|
+
<div id="M000046_source" class="dyn-source">
|
|
191
|
+
<pre><span class="ruby-comment cmt"># File lib/erbook/rdoc.rb, line 19</span>
|
|
192
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">all_modules</span>
|
|
193
|
+
<span class="ruby-ivar">@all_modules</span>.<span class="ruby-identifier">values</span>
|
|
194
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
195
|
+
</div>
|
|
196
|
+
</div>
|
|
197
|
+
|
|
198
|
+
</div>
|
|
199
|
+
|
|
200
|
+
<div class="method">
|
|
201
|
+
<div class="title" id="M000049">
|
|
202
|
+
|
|
203
|
+
<a name="M000049"></a><b>parse</b>(aCodeString, aFileName = __FILE__)
|
|
204
|
+
|
|
205
|
+
</div>
|
|
206
|
+
|
|
207
|
+
<div class="description">
|
|
208
|
+
<p>
|
|
209
|
+
Returns a <a href="TopLevel.html">RDoc::TopLevel</a> object containing
|
|
210
|
+
information parsed from the given code string. This information is also
|
|
211
|
+
added to the global <a href="TopLevel.html">TopLevel</a> class state, so
|
|
212
|
+
you can access it via the class methods of the <a
|
|
213
|
+
href="TopLevel.html">TopLevel</a> class.
|
|
214
|
+
</p>
|
|
215
|
+
<p>
|
|
216
|
+
If the file name (which signifies the origin of the given code) is given,
|
|
217
|
+
it MUST have a “.c” or “.rb” file extension.
|
|
218
|
+
Otherwise, <a href="../RDoc.html">RDoc</a> will ignore the given code
|
|
219
|
+
string! :-(
|
|
220
|
+
</p>
|
|
221
|
+
|
|
222
|
+
</div>
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
<div class="sourcecode">
|
|
228
|
+
<p class="source-link">
|
|
229
|
+
Source: <a href="javascript:toggleSource('M000049_source')" id="l_M000049_source">show</a>
|
|
230
|
+
|
|
231
|
+
| <a href="http://github.com/sunaku/erbook/blob/a096a4140d3d9ea230c89aba50526af5e4613f82/lib/erbook/rdoc.rb#L56" target="_blank" class="github_url">on GitHub</a>
|
|
232
|
+
|
|
233
|
+
</p>
|
|
234
|
+
<div id="M000049_source" class="dyn-source">
|
|
235
|
+
<pre><span class="ruby-comment cmt"># File lib/erbook/rdoc.rb, line 56</span>
|
|
236
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">parse</span> <span class="ruby-identifier">aCodeString</span>, <span class="ruby-identifier">aFileName</span> = <span class="ruby-keyword kw">__FILE__</span>
|
|
237
|
+
<span class="ruby-identifier">tl</span> = <span class="ruby-constant">TopLevel</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">aFileName</span>)
|
|
238
|
+
<span class="ruby-identifier">op</span> = <span class="ruby-constant">DummyOptions</span>.<span class="ruby-identifier">new</span>
|
|
239
|
+
<span class="ruby-identifier">st</span> = <span class="ruby-constant">Stats</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">0</span>)
|
|
240
|
+
|
|
241
|
+
<span class="ruby-identifier">result</span> = <span class="ruby-constant">Parser</span>.<span class="ruby-identifier">for</span>(<span class="ruby-identifier">tl</span>, <span class="ruby-identifier">aFileName</span>, <span class="ruby-identifier">aCodeString</span>, <span class="ruby-identifier">op</span>, <span class="ruby-identifier">st</span>).<span class="ruby-identifier">scan</span>
|
|
242
|
+
|
|
243
|
+
<span class="ruby-identifier">refresh_all_classes_and_modules</span>
|
|
244
|
+
|
|
245
|
+
<span class="ruby-identifier">result</span>
|
|
246
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
247
|
+
</div>
|
|
248
|
+
</div>
|
|
249
|
+
|
|
250
|
+
</div>
|
|
251
|
+
|
|
252
|
+
<div class="method">
|
|
253
|
+
<div class="title" id="M000050">
|
|
254
|
+
|
|
255
|
+
<a name="M000050"></a><b>parse_file</b>(aFileName)
|
|
256
|
+
|
|
257
|
+
</div>
|
|
258
|
+
|
|
259
|
+
<div class="description">
|
|
260
|
+
<p>
|
|
261
|
+
Returns a <a href="TopLevel.html">RDoc::TopLevel</a> object containing
|
|
262
|
+
information parsed from the code in the given file. This information is
|
|
263
|
+
also added to the global <a href="TopLevel.html">TopLevel</a> class state,
|
|
264
|
+
so you can access it via the class methods of the <a
|
|
265
|
+
href="TopLevel.html">TopLevel</a> class.
|
|
266
|
+
</p>
|
|
267
|
+
<p>
|
|
268
|
+
The given file name MUST have a “.c” or “.rb” file
|
|
269
|
+
extension. Otherwise, <a href="../RDoc.html">RDoc</a> will ignore the file!
|
|
270
|
+
:-(
|
|
271
|
+
</p>
|
|
272
|
+
|
|
273
|
+
</div>
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
<div class="sourcecode">
|
|
279
|
+
<p class="source-link">
|
|
280
|
+
Source: <a href="javascript:toggleSource('M000050_source')" id="l_M000050_source">show</a>
|
|
281
|
+
|
|
282
|
+
| <a href="http://github.com/sunaku/erbook/blob/a096a4140d3d9ea230c89aba50526af5e4613f82/lib/erbook/rdoc.rb#L76" target="_blank" class="github_url">on GitHub</a>
|
|
283
|
+
|
|
284
|
+
</p>
|
|
285
|
+
<div id="M000050_source" class="dyn-source">
|
|
286
|
+
<pre><span class="ruby-comment cmt"># File lib/erbook/rdoc.rb, line 76</span>
|
|
287
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">parse_file</span> <span class="ruby-identifier">aFileName</span>
|
|
288
|
+
<span class="ruby-identifier">parse</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">aFileName</span>), <span class="ruby-identifier">aFileName</span>
|
|
289
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
290
|
+
</div>
|
|
291
|
+
</div>
|
|
292
|
+
|
|
293
|
+
</div>
|
|
294
|
+
|
|
295
|
+
<div class="method">
|
|
296
|
+
<div class="title" id="M000048">
|
|
297
|
+
|
|
298
|
+
<a name="M000048"></a><b>refresh_all_classes_and_modules</b>()
|
|
299
|
+
|
|
300
|
+
</div>
|
|
301
|
+
|
|
302
|
+
<div class="description">
|
|
303
|
+
<p>
|
|
304
|
+
Update the return value of the all_classes_and_modules() method to
|
|
305
|
+
<b>really</b> include every class and every module seen thus far.
|
|
306
|
+
</p>
|
|
307
|
+
|
|
308
|
+
</div>
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
<div class="sourcecode">
|
|
314
|
+
<p class="source-link">
|
|
315
|
+
Source: <a href="javascript:toggleSource('M000048_source')" id="l_M000048_source">show</a>
|
|
316
|
+
|
|
317
|
+
| <a href="http://github.com/sunaku/erbook/blob/a096a4140d3d9ea230c89aba50526af5e4613f82/lib/erbook/rdoc.rb#L31" target="_blank" class="github_url">on GitHub</a>
|
|
318
|
+
|
|
319
|
+
</p>
|
|
320
|
+
<div id="M000048_source" class="dyn-source">
|
|
321
|
+
<pre><span class="ruby-comment cmt"># File lib/erbook/rdoc.rb, line 31</span>
|
|
322
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">refresh_all_classes_and_modules</span>
|
|
323
|
+
<span class="ruby-identifier">visit</span> = <span class="ruby-identifier">lambda</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">node</span><span class="ruby-operator">|</span>
|
|
324
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">node</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">NormalClass</span> <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">node</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">SingleClass</span>
|
|
325
|
+
<span class="ruby-ivar">@all_classes</span>[<span class="ruby-identifier">node</span>.<span class="ruby-identifier">full_name</span>] = <span class="ruby-identifier">node</span>
|
|
326
|
+
|
|
327
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">node</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">NormalModule</span>
|
|
328
|
+
<span class="ruby-ivar">@all_modules</span>[<span class="ruby-identifier">node</span>.<span class="ruby-identifier">full_name</span>] = <span class="ruby-identifier">node</span>
|
|
329
|
+
<span class="ruby-keyword kw">end</span>
|
|
330
|
+
|
|
331
|
+
(<span class="ruby-identifier">node</span>.<span class="ruby-identifier">classes</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">node</span>.<span class="ruby-identifier">modules</span>).<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">n</span><span class="ruby-operator">|</span> <span class="ruby-identifier">visit</span>[<span class="ruby-identifier">n</span>] }
|
|
332
|
+
<span class="ruby-keyword kw">end</span>
|
|
333
|
+
|
|
334
|
+
<span class="ruby-identifier">all_classes_and_modules</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">n</span><span class="ruby-operator">|</span> <span class="ruby-identifier">visit</span>[<span class="ruby-identifier">n</span>] }
|
|
335
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
336
|
+
</div>
|
|
337
|
+
</div>
|
|
338
|
+
|
|
339
|
+
</div>
|
|
340
|
+
|
|
341
|
+
</div>
|
|
342
|
+
</div>
|
|
343
|
+
</body>
|
|
344
|
+
</html>
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
3
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
4
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
5
|
+
<head>
|
|
6
|
+
<title>String</title>
|
|
7
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
8
|
+
<link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" />
|
|
9
|
+
<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" />
|
|
10
|
+
<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
|
|
11
|
+
<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script>
|
|
12
|
+
<script src="../js/main.js" type="text/javascript" charset="utf-8"></script>
|
|
13
|
+
</head>
|
|
14
|
+
|
|
15
|
+
<body>
|
|
16
|
+
<div class="banner">
|
|
17
|
+
<h1>
|
|
18
|
+
<span class="type">Class</span>
|
|
19
|
+
String
|
|
20
|
+
|
|
21
|
+
<span class="parent"><
|
|
22
|
+
|
|
23
|
+
Object
|
|
24
|
+
|
|
25
|
+
</span>
|
|
26
|
+
|
|
27
|
+
</h1>
|
|
28
|
+
<ul class="files">
|
|
29
|
+
|
|
30
|
+
<li><a href="../files/lib/erbook/to_xhtml_rb.html">lib/erbook/to_xhtml.rb</a></li>
|
|
31
|
+
|
|
32
|
+
</ul>
|
|
33
|
+
</div>
|
|
34
|
+
<div id="bodyContent">
|
|
35
|
+
<div id="content">
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
<div class="sectiontitle">Methods</div>
|
|
46
|
+
<dl class="methods">
|
|
47
|
+
|
|
48
|
+
<dt>T</dt>
|
|
49
|
+
<dd>
|
|
50
|
+
<ul>
|
|
51
|
+
|
|
52
|
+
<li><a href="#M000036">to_inline_xhtml</a>,</li>
|
|
53
|
+
|
|
54
|
+
<li><a href="#M000037">to_xhtml</a></li>
|
|
55
|
+
|
|
56
|
+
</ul>
|
|
57
|
+
</dd>
|
|
58
|
+
|
|
59
|
+
</dl>
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
<div class="sectiontitle">Constants</div>
|
|
70
|
+
<table border='0' cellpadding='5'>
|
|
71
|
+
|
|
72
|
+
<tr valign='top'>
|
|
73
|
+
<td class="attr-name">PROTECTED_TAGS</td>
|
|
74
|
+
<td>=</td>
|
|
75
|
+
<td class="attr-value">{ :pre => :block, # tag => is it a block or inline element? :code => :inline, :tt => :inline }</td>
|
|
76
|
+
</tr>
|
|
77
|
+
|
|
78
|
+
<tr valign='top'>
|
|
79
|
+
<td> </td>
|
|
80
|
+
<td colspan="2" class="attr-desc"><p>
|
|
81
|
+
The content of these XHTML tags will be preserved while they are being
|
|
82
|
+
processed by Textile. By doing this, we avoid unwanted Textile
|
|
83
|
+
transformations, such as quotation marks becoming curly (&8192;), in
|
|
84
|
+
source code.
|
|
85
|
+
</p>
|
|
86
|
+
</td>
|
|
87
|
+
</tr>
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
<tr valign='top'>
|
|
91
|
+
<td class="attr-name">VERBATIM_TAGS</td>
|
|
92
|
+
<td>=</td>
|
|
93
|
+
<td class="attr-value">{ :noformat => :block # tag => is it a block or inline element? }</td>
|
|
94
|
+
</tr>
|
|
95
|
+
|
|
96
|
+
<tr valign='top'>
|
|
97
|
+
<td> </td>
|
|
98
|
+
<td colspan="2" class="attr-desc"><p>
|
|
99
|
+
The content of these XHTML tags will be preserved <b>verbatim</b>
|
|
100
|
+
throughout the text-to-XHTML conversion process.
|
|
101
|
+
</p>
|
|
102
|
+
</td>
|
|
103
|
+
</tr>
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
</table>
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
<div class="sectiontitle">Instance Public methods</div>
|
|
113
|
+
|
|
114
|
+
<div class="method">
|
|
115
|
+
<div class="title" id="M000036">
|
|
116
|
+
|
|
117
|
+
<a name="M000036"></a><b>to_inline_xhtml</b>()
|
|
118
|
+
|
|
119
|
+
</div>
|
|
120
|
+
|
|
121
|
+
<div class="description">
|
|
122
|
+
<p>
|
|
123
|
+
Transforms this string into an <b>inline</b> XHTML string (one that does
|
|
124
|
+
not contain any block-level XHTML elements at the root).
|
|
125
|
+
</p>
|
|
126
|
+
|
|
127
|
+
</div>
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
<div class="sourcecode">
|
|
133
|
+
<p class="source-link">
|
|
134
|
+
Source: <a href="javascript:toggleSource('M000036_source')" id="l_M000036_source">show</a>
|
|
135
|
+
|
|
136
|
+
| <a href="http://github.com/sunaku/erbook/blob/a096a4140d3d9ea230c89aba50526af5e4613f82/lib/erbook/to_xhtml.rb#L46" target="_blank" class="github_url">on GitHub</a>
|
|
137
|
+
|
|
138
|
+
</p>
|
|
139
|
+
<div id="M000036_source" class="dyn-source">
|
|
140
|
+
<pre><span class="ruby-comment cmt"># File lib/erbook/to_xhtml.rb, line 46</span>
|
|
141
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_inline_xhtml</span>
|
|
142
|
+
<span class="ruby-identifier">to_xhtml</span> <span class="ruby-keyword kw">true</span>
|
|
143
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
144
|
+
</div>
|
|
145
|
+
</div>
|
|
146
|
+
|
|
147
|
+
</div>
|
|
148
|
+
|
|
149
|
+
<div class="method">
|
|
150
|
+
<div class="title" id="M000037">
|
|
151
|
+
|
|
152
|
+
<a name="M000037"></a><b>to_xhtml</b>(inline = false)
|
|
153
|
+
|
|
154
|
+
</div>
|
|
155
|
+
|
|
156
|
+
<div class="description">
|
|
157
|
+
<p>
|
|
158
|
+
Transforms this string into XHTML while ensuring that the result contains
|
|
159
|
+
one or more block-level elements at the root.
|
|
160
|
+
</p>
|
|
161
|
+
<dl>
|
|
162
|
+
<dt>inline</dt><dd>If true, the resulting XHTML will <b>not</b> contain a block-level element
|
|
163
|
+
at the root.
|
|
164
|
+
|
|
165
|
+
</dd>
|
|
166
|
+
</dl>
|
|
167
|
+
|
|
168
|
+
</div>
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
<div class="sourcecode">
|
|
174
|
+
<p class="source-link">
|
|
175
|
+
Source: <a href="javascript:toggleSource('M000037_source')" id="l_M000037_source">show</a>
|
|
176
|
+
|
|
177
|
+
| <a href="http://github.com/sunaku/erbook/blob/a096a4140d3d9ea230c89aba50526af5e4613f82/lib/erbook/to_xhtml.rb#L58" target="_blank" class="github_url">on GitHub</a>
|
|
178
|
+
|
|
179
|
+
</p>
|
|
180
|
+
<div id="M000037_source" class="dyn-source">
|
|
181
|
+
<pre><span class="ruby-comment cmt"># File lib/erbook/to_xhtml.rb, line 58</span>
|
|
182
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_xhtml</span> <span class="ruby-identifier">inline</span> = <span class="ruby-keyword kw">false</span>
|
|
183
|
+
<span class="ruby-identifier">with_protected_tags</span>(<span class="ruby-keyword kw">self</span>, <span class="ruby-constant">VERBATIM_TAGS</span>, <span class="ruby-keyword kw">true</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">text</span><span class="ruby-operator">|</span>
|
|
184
|
+
<span class="ruby-identifier">html</span> = <span class="ruby-identifier">with_protected_tags</span>(<span class="ruby-identifier">text</span>, <span class="ruby-constant">PROTECTED_TAGS</span>, <span class="ruby-keyword kw">false</span>) <span class="ruby-keyword kw">do</span>
|
|
185
|
+
<span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">thru_maruku</span> <span class="ruby-identifier">inline</span>
|
|
186
|
+
<span class="ruby-keyword kw">end</span>
|
|
187
|
+
|
|
188
|
+
<span class="ruby-comment cmt"># Markdown's "code spans" should really be "pre spans"</span>
|
|
189
|
+
<span class="ruby-keyword kw">while</span> <span class="ruby-identifier">html</span>.<span class="ruby-identifier">gsub!</span> <span class="ruby-regexp re">%r{(<pre>)<code>(.*?)</code>(</pre>)}</span><span class="ruby-identifier">m</span>, <span class="ruby-value str">'\1\2\3'</span>
|
|
190
|
+
<span class="ruby-keyword kw">end</span>
|
|
191
|
+
|
|
192
|
+
<span class="ruby-comment cmt"># allow user to type <pre> blocks on single lines</span>
|
|
193
|
+
<span class="ruby-comment cmt"># without affecting the display of their content</span>
|
|
194
|
+
<span class="ruby-identifier">html</span>.<span class="ruby-identifier">gsub!</span> <span class="ruby-regexp re">%r{(<pre>)[ \t]*\r?\n|\r?\n[ \t]*(</pre>)}</span>, <span class="ruby-value str">'\1\2'</span>
|
|
195
|
+
|
|
196
|
+
<span class="ruby-comment cmt"># ensure tables have a border: this *greatly* improves</span>
|
|
197
|
+
<span class="ruby-comment cmt"># readability in text-based web browsers like w3m and lynx</span>
|
|
198
|
+
<span class="ruby-identifier">html</span>.<span class="ruby-identifier">gsub!</span> <span class="ruby-regexp re">%r/<table\b/</span>, <span class="ruby-value str">'\& border="1"'</span>
|
|
199
|
+
|
|
200
|
+
<span class="ruby-comment cmt"># add syntax coloring</span>
|
|
201
|
+
<span class="ruby-identifier">html</span>.<span class="ruby-identifier">thru_coderay</span>
|
|
202
|
+
<span class="ruby-keyword kw">end</span>
|
|
203
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
204
|
+
</div>
|
|
205
|
+
</div>
|
|
206
|
+
|
|
207
|
+
</div>
|
|
208
|
+
|
|
209
|
+
</div>
|
|
210
|
+
</div>
|
|
211
|
+
</body>
|
|
212
|
+
</html>
|