erbook 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. data/LICENSE +13 -0
  2. data/README +14 -0
  3. data/Rakefile +77 -0
  4. data/bin/erbook +309 -0
  5. data/doc/HelloWorld.input +37 -0
  6. data/doc/HelloWorld.spec +62 -0
  7. data/doc/README +6 -0
  8. data/doc/api/classes/ERBook.html +164 -0
  9. data/doc/api/classes/RDoc.html +112 -0
  10. data/doc/api/classes/RDoc/AnyMethod.html +195 -0
  11. data/doc/api/classes/RDoc/AnyMethod.src/M000005.html +18 -0
  12. data/doc/api/classes/RDoc/AnyMethod.src/M000006.html +23 -0
  13. data/doc/api/classes/RDoc/AnyMethod.src/M000007.html +18 -0
  14. data/doc/api/classes/RDoc/AnyMethod.src/M000008.html +22 -0
  15. data/doc/api/classes/RDoc/TopLevel.html +250 -0
  16. data/doc/api/classes/RDoc/TopLevel.src/M000009.html +18 -0
  17. data/doc/api/classes/RDoc/TopLevel.src/M000010.html +18 -0
  18. data/doc/api/classes/RDoc/TopLevel.src/M000011.html +18 -0
  19. data/doc/api/classes/RDoc/TopLevel.src/M000012.html +29 -0
  20. data/doc/api/classes/RDoc/TopLevel.src/M000013.html +25 -0
  21. data/doc/api/classes/RDoc/TopLevel.src/M000014.html +18 -0
  22. data/doc/api/classes/String.html +261 -0
  23. data/doc/api/classes/String.src/M000001.html +18 -0
  24. data/doc/api/classes/String.src/M000002.html +34 -0
  25. data/doc/api/classes/String.src/M000003.html +20 -0
  26. data/doc/api/classes/String.src/M000004.html +26 -0
  27. data/doc/api/created.rid +1 -0
  28. data/doc/api/files/lib/erbook/html_rb.html +125 -0
  29. data/doc/api/files/lib/erbook/rdoc_rb.html +116 -0
  30. data/doc/api/files/lib/erbook_rb.html +107 -0
  31. data/doc/api/fr_class_index.html +31 -0
  32. data/doc/api/fr_file_index.html +29 -0
  33. data/doc/api/fr_method_index.html +40 -0
  34. data/doc/api/index.html +24 -0
  35. data/doc/api/rdoc-style.css +208 -0
  36. data/doc/erbook.png +0 -0
  37. data/doc/erbook.svg +349 -0
  38. data/doc/feed-icon-28x28.png +0 -0
  39. data/doc/index.html +2663 -0
  40. data/doc/manual.erb +769 -0
  41. data/fmt/html.icons/LICENSE +67 -0
  42. data/fmt/html.icons/README +31 -0
  43. data/fmt/html.icons/caution.png +0 -0
  44. data/fmt/html.icons/important.png +0 -0
  45. data/fmt/html.icons/note.png +0 -0
  46. data/fmt/html.icons/quote.png +0 -0
  47. data/fmt/html.icons/tip.png +0 -0
  48. data/fmt/html.icons/warning.png +0 -0
  49. data/fmt/html.yaml +1185 -0
  50. data/fmt/latex.yaml +2 -0
  51. data/fmt/man.yaml +2 -0
  52. data/fmt/text.yaml +2 -0
  53. data/lib/erbook.rb +13 -0
  54. data/lib/erbook/html.rb +145 -0
  55. data/lib/erbook/rdoc.rb +126 -0
  56. metadata +141 -0
@@ -0,0 +1,62 @@
1
+ desc: An example format.
2
+
3
+ code: |
4
+ # Returns a random, yet pronounceable, name.
5
+ def generate_name
6
+ letters = ('a'..'z').to_a - %w[ c q w x ] # redundant sounds
7
+ vowels = %w[a e i o u]
8
+ consonants = letters - vowels
9
+ sets = [consonants, vowels]
10
+
11
+ length = 3 + rand(5)
12
+
13
+ name = (0...length).map do |i|
14
+ # alternate between consonants and vowels
15
+ set = sets[i % sets.length]
16
+
17
+ # choose a random letter from the set
18
+ set[rand(set.length)]
19
+ end.join
20
+
21
+ name
22
+ end
23
+
24
+ class Node
25
+ def name
26
+ # dynamically compute (and store)
27
+ # the name of this node on demand
28
+ @name ||= generate_name
29
+ end
30
+ end
31
+
32
+ nodes:
33
+ hello:
34
+ index: true
35
+ number: true
36
+ silent: false
37
+ output: |
38
+ <h3><%= @node.type %> #<%= @node.index %>: <%= @node.name.inspect %></h3>
39
+
40
+ My name is <%= @node.name.inspect %> and these are my properties:
41
+
42
+ <dl style="<%= $style %>">
43
+ <dt>args</dt>
44
+ <dd><code><%= @node.args.inspect %></code></dd>
45
+
46
+ <dt>index</dt>
47
+ <dd><code><%= @node.index.inspect %></code></dd>
48
+
49
+ <dt>number</dt>
50
+ <dd><code><%= @node.number.inspect %></code></dd>
51
+
52
+ <dt>trace</dt>
53
+ <dd><pre><%= @node.trace.join("\n") %></pre></dd>
54
+
55
+ <dt>content</dt>
56
+ <dd><%= @node.content %></dd>
57
+ </dl>
58
+
59
+ output: |
60
+ Welcome to the "<%= @spec[:name] %>" format.
61
+ <%= @content %>
62
+ That's all folks!
@@ -0,0 +1,6 @@
1
+ The erbook logo, its image file "erbook.png", and its source file "erbook.svg"
2
+ make use of [the "cartoon owl sitting on a book" graphic] [1] that was created
3
+ and released into the public domain by [Jens Vierbuchen] [2] on July 7, 2008.
4
+
5
+ [1]: http://openclipart.org/media/files/lemmling/9065
6
+ [2]: http://openclipart.org/media/people/lemmling
@@ -0,0 +1,164 @@
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>Module: ERBook</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>Module</strong></td>
53
+ <td class="class-name-in-header">ERBook</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../files/lib/erbook_rb.html">
59
+ lib/erbook.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ </table>
66
+ </div>
67
+ <!-- banner header -->
68
+
69
+ <div id="bodyContent">
70
+
71
+
72
+
73
+ <div id="contextContent">
74
+
75
+ <div id="description">
76
+ <p>
77
+ Project and release information.
78
+ </p>
79
+
80
+ </div>
81
+
82
+
83
+ </div>
84
+
85
+
86
+ </div>
87
+
88
+
89
+ <!-- if includes -->
90
+
91
+ <div id="section">
92
+
93
+
94
+ <div id="constants-list">
95
+ <h3 class="section-bar">Constants</h3>
96
+
97
+ <div class="name-list">
98
+ <table summary="Constants">
99
+ <tr class="top-aligned-row context-row">
100
+ <td class="context-item-name">PROJECT</td>
101
+ <td>=</td>
102
+ <td class="context-item-value">'erbook'</td>
103
+ </tr>
104
+ <tr class="top-aligned-row context-row">
105
+ <td class="context-item-name">VERSION</td>
106
+ <td>=</td>
107
+ <td class="context-item-value">'4.0.0'</td>
108
+ </tr>
109
+ <tr class="top-aligned-row context-row">
110
+ <td class="context-item-name">RELEASE</td>
111
+ <td>=</td>
112
+ <td class="context-item-value">'2008-11-15'</td>
113
+ </tr>
114
+ <tr class="top-aligned-row context-row">
115
+ <td class="context-item-name">WEBSITE</td>
116
+ <td>=</td>
117
+ <td class="context-item-value">'http://snk.tuxfamily.org/lib/erbook'</td>
118
+ </tr>
119
+ <tr class="top-aligned-row context-row">
120
+ <td class="context-item-name">SUMMARY</td>
121
+ <td>=</td>
122
+ <td class="context-item-value">'Extensible document processor based on eRuby.'</td>
123
+ </tr>
124
+ <tr class="top-aligned-row context-row">
125
+ <td class="context-item-name">DISPLAY</td>
126
+ <td>=</td>
127
+ <td class="context-item-value">PROJECT + ' ' + VERSION</td>
128
+ </tr>
129
+ <tr class="top-aligned-row context-row">
130
+ <td class="context-item-name">INSTALL_DIR</td>
131
+ <td>=</td>
132
+ <td class="context-item-value">File.expand_path File.join(File.dirname(__FILE__), '..')</td>
133
+ </tr>
134
+ <tr class="top-aligned-row context-row">
135
+ <td class="context-item-name">FORMATS_DIR</td>
136
+ <td>=</td>
137
+ <td class="context-item-value">File.join INSTALL_DIR, 'fmt'</td>
138
+ </tr>
139
+ <tr class="top-aligned-row context-row">
140
+ <td class="context-item-name">FORMAT_FILES</td>
141
+ <td>=</td>
142
+ <td class="context-item-value">Dir[File.join(FORMATS_DIR, '*.yaml')]</td>
143
+ </tr>
144
+ </table>
145
+ </div>
146
+ </div>
147
+
148
+
149
+
150
+
151
+
152
+
153
+ <!-- if method_list -->
154
+
155
+
156
+ </div>
157
+
158
+
159
+ <div id="validator-badges">
160
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
161
+ </div>
162
+
163
+ </body>
164
+ </html>
@@ -0,0 +1,112 @@
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>Module: RDoc</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>Module</strong></td>
53
+ <td class="class-name-in-header">RDoc</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../files/lib/erbook/rdoc_rb.html">
59
+ lib/erbook/rdoc.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ </table>
66
+ </div>
67
+ <!-- banner header -->
68
+
69
+ <div id="bodyContent">
70
+
71
+
72
+
73
+ <div id="contextContent">
74
+
75
+
76
+
77
+ </div>
78
+
79
+
80
+ </div>
81
+
82
+
83
+ <!-- if includes -->
84
+
85
+ <div id="section">
86
+
87
+ <div id="class-list">
88
+ <h3 class="section-bar">Classes and Modules</h3>
89
+
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 />
92
+
93
+ </div>
94
+
95
+
96
+
97
+
98
+
99
+
100
+
101
+ <!-- if method_list -->
102
+
103
+
104
+ </div>
105
+
106
+
107
+ <div id="validator-badges">
108
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
109
+ </div>
110
+
111
+ </body>
112
+ </html>
@@ -0,0 +1,195 @@
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::AnyMethod</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::AnyMethod</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/lib/erbook/rdoc_rb.html">
59
+ lib/erbook/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="#M000007">comment_html</a>&nbsp;&nbsp;
90
+ <a href="#M000006">decl</a>&nbsp;&nbsp;
91
+ <a href="#M000005">full_name</a>&nbsp;&nbsp;
92
+ <a href="#M000008">top_level</a>&nbsp;&nbsp;
93
+ </div>
94
+ </div>
95
+
96
+ </div>
97
+
98
+
99
+ <!-- if includes -->
100
+
101
+ <div id="section">
102
+
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+ <!-- if method_list -->
111
+ <div id="methods">
112
+ <h3 class="section-bar">Public Instance methods</h3>
113
+
114
+ <div id="method-M000007" class="method-detail">
115
+ <a name="M000007"></a>
116
+
117
+ <div class="method-heading">
118
+ <a href="AnyMethod.src/M000007.html" target="Code" class="method-signature"
119
+ onclick="popupCode('AnyMethod.src/M000007.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-M000006" class="method-detail">
132
+ <a name="M000006"></a>
133
+
134
+ <div class="method-heading">
135
+ <a href="AnyMethod.src/M000006.html" target="Code" class="method-signature"
136
+ onclick="popupCode('AnyMethod.src/M000006.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-M000005" class="method-detail">
149
+ <a name="M000005"></a>
150
+
151
+ <div class="method-heading">
152
+ <a href="AnyMethod.src/M000005.html" target="Code" class="method-signature"
153
+ onclick="popupCode('AnyMethod.src/M000005.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
+
165
+ <div id="method-M000008" class="method-detail">
166
+ <a name="M000008"></a>
167
+
168
+ <div class="method-heading">
169
+ <a href="AnyMethod.src/M000008.html" target="Code" class="method-signature"
170
+ onclick="popupCode('AnyMethod.src/M000008.html');return false;">
171
+ <span class="method-name">top_level</span><span class="method-args">()</span>
172
+ </a>
173
+ </div>
174
+
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>
180
+ </div>
181
+ </div>
182
+
183
+
184
+ </div>
185
+
186
+
187
+ </div>
188
+
189
+
190
+ <div id="validator-badges">
191
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
192
+ </div>
193
+
194
+ </body>
195
+ </html>