bitclust-core 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (127) hide show
  1. data/ChangeLog +2907 -0
  2. data/Gemfile +7 -0
  3. data/README +21 -0
  4. data/Rakefile +20 -0
  5. data/bin/bitclust +14 -0
  6. data/bin/refe +36 -0
  7. data/bitclust-dev.gemspec +33 -0
  8. data/bitclust.gemspec +30 -0
  9. data/config.in +23 -0
  10. data/config.ru +48 -0
  11. data/config.ru.sample +31 -0
  12. data/data/bitclust/catalog/ja_JP.EUC-JP +78 -0
  13. data/data/bitclust/catalog/ja_JP.UTF-8 +78 -0
  14. data/data/bitclust/template.lillia/class +98 -0
  15. data/data/bitclust/template.lillia/class-index +28 -0
  16. data/data/bitclust/template.lillia/doc +48 -0
  17. data/data/bitclust/template.lillia/layout +19 -0
  18. data/data/bitclust/template.lillia/library +129 -0
  19. data/data/bitclust/template.lillia/library-index +32 -0
  20. data/data/bitclust/template.lillia/method +20 -0
  21. data/data/bitclust/template.lillia/rd_file +6 -0
  22. data/data/bitclust/template.offline/class +67 -0
  23. data/data/bitclust/template.offline/class-index +28 -0
  24. data/data/bitclust/template.offline/doc +13 -0
  25. data/data/bitclust/template.offline/function +22 -0
  26. data/data/bitclust/template.offline/function-index +24 -0
  27. data/data/bitclust/template.offline/layout +18 -0
  28. data/data/bitclust/template.offline/library +87 -0
  29. data/data/bitclust/template.offline/library-index +32 -0
  30. data/data/bitclust/template.offline/method +21 -0
  31. data/data/bitclust/template.offline/rd_file +6 -0
  32. data/data/bitclust/template/class +133 -0
  33. data/data/bitclust/template/class-index +30 -0
  34. data/data/bitclust/template/doc +14 -0
  35. data/data/bitclust/template/function +21 -0
  36. data/data/bitclust/template/function-index +25 -0
  37. data/data/bitclust/template/layout +19 -0
  38. data/data/bitclust/template/library +89 -0
  39. data/data/bitclust/template/library-index +35 -0
  40. data/data/bitclust/template/method +24 -0
  41. data/data/bitclust/template/opensearchdescription +10 -0
  42. data/data/bitclust/template/search +57 -0
  43. data/lib/bitclust.rb +9 -0
  44. data/lib/bitclust/app.rb +129 -0
  45. data/lib/bitclust/classentry.rb +425 -0
  46. data/lib/bitclust/compat.rb +39 -0
  47. data/lib/bitclust/completion.rb +531 -0
  48. data/lib/bitclust/crossrubyutils.rb +91 -0
  49. data/lib/bitclust/database.rb +181 -0
  50. data/lib/bitclust/docentry.rb +83 -0
  51. data/lib/bitclust/entry.rb +223 -0
  52. data/lib/bitclust/exception.rb +38 -0
  53. data/lib/bitclust/functiondatabase.rb +115 -0
  54. data/lib/bitclust/functionentry.rb +81 -0
  55. data/lib/bitclust/functionreferenceparser.rb +76 -0
  56. data/lib/bitclust/htmlutils.rb +80 -0
  57. data/lib/bitclust/interface.rb +87 -0
  58. data/lib/bitclust/libraryentry.rb +211 -0
  59. data/lib/bitclust/lineinput.rb +165 -0
  60. data/lib/bitclust/messagecatalog.rb +95 -0
  61. data/lib/bitclust/methoddatabase.rb +401 -0
  62. data/lib/bitclust/methodentry.rb +202 -0
  63. data/lib/bitclust/methodid.rb +209 -0
  64. data/lib/bitclust/methodsignature.rb +82 -0
  65. data/lib/bitclust/nameutils.rb +236 -0
  66. data/lib/bitclust/parseutils.rb +60 -0
  67. data/lib/bitclust/preprocessor.rb +273 -0
  68. data/lib/bitclust/rdcompiler.rb +507 -0
  69. data/lib/bitclust/refsdatabase.rb +66 -0
  70. data/lib/bitclust/requesthandler.rb +330 -0
  71. data/lib/bitclust/ridatabase.rb +349 -0
  72. data/lib/bitclust/rrdparser.rb +522 -0
  73. data/lib/bitclust/runner.rb +143 -0
  74. data/lib/bitclust/screen.rb +554 -0
  75. data/lib/bitclust/searcher.rb +518 -0
  76. data/lib/bitclust/server.rb +59 -0
  77. data/lib/bitclust/simplesearcher.rb +84 -0
  78. data/lib/bitclust/subcommand.rb +746 -0
  79. data/lib/bitclust/textutils.rb +51 -0
  80. data/lib/bitclust/version.rb +3 -0
  81. data/packer.rb +224 -0
  82. data/refe2.gemspec +29 -0
  83. data/server.exe +0 -0
  84. data/server.exy +159 -0
  85. data/server.rb +10 -0
  86. data/setup.rb +1596 -0
  87. data/standalone.rb +193 -0
  88. data/test/run_test.rb +15 -0
  89. data/test/test_bitclust.rb +81 -0
  90. data/test/test_entry.rb +39 -0
  91. data/test/test_functiondatabase.rb +55 -0
  92. data/test/test_libraryentry.rb +31 -0
  93. data/test/test_methoddatabase.rb +81 -0
  94. data/test/test_methodsignature.rb +14 -0
  95. data/test/test_nameutils.rb +324 -0
  96. data/test/test_preprocessor.rb +84 -0
  97. data/test/test_rdcompiler.rb +534 -0
  98. data/test/test_refsdatabase.rb +76 -0
  99. data/test/test_rrdparser.rb +26 -0
  100. data/test/test_runner.rb +102 -0
  101. data/test/test_simplesearcher.rb +48 -0
  102. data/theme/default/images/external.png +0 -0
  103. data/theme/default/rurema.png +0 -0
  104. data/theme/default/style.css +288 -0
  105. data/theme/default/test.css +254 -0
  106. data/theme/lillia/rurema.png +0 -0
  107. data/theme/lillia/style.css +331 -0
  108. data/theme/lillia/test.css +254 -0
  109. data/tools/bc-ancestors.rb +153 -0
  110. data/tools/bc-checkparams.rb +246 -0
  111. data/tools/bc-classes.rb +80 -0
  112. data/tools/bc-convert.rb +165 -0
  113. data/tools/bc-list.rb +63 -0
  114. data/tools/bc-methods.rb +171 -0
  115. data/tools/bc-preproc.rb +42 -0
  116. data/tools/bc-rdoc.rb +343 -0
  117. data/tools/bc-tochm.rb +301 -0
  118. data/tools/bc-tohtml.rb +125 -0
  119. data/tools/bc-tohtmlpackage.rb +241 -0
  120. data/tools/check-signature.rb +19 -0
  121. data/tools/forall-ruby.rb +20 -0
  122. data/tools/gencatalog.rb +69 -0
  123. data/tools/statrefm.rb +98 -0
  124. data/tools/stattodo.rb +150 -0
  125. data/tools/update-database.rb +146 -0
  126. data/view.cgi +6 -0
  127. metadata +222 -0
@@ -0,0 +1,18 @@
1
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2
+ <html lang="ja-JP">
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=<%=h charset() %>">
5
+ <meta http-equiv="Content-Language" content="ja-JP">
6
+ <link rel="stylesheet" type="text/css" href="<%=h css_url() %>">
7
+ <link rel="icon" type="image/png" href="<%=h favicon_url() %>">
8
+ <title><%=h @title %></title>
9
+ </head>
10
+ <body>
11
+ <%= yield %>
12
+ <div id="footer">
13
+ <a rel="license" href="http://creativecommons.org/licenses/by/3.0/">
14
+ <img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by/3.0/88x31.png" />
15
+ </a>
16
+ </div>
17
+ </body>
18
+ </html>
@@ -0,0 +1,87 @@
1
+ <% @title = "library #{@entry.name}" %>
2
+ <p>
3
+ <%= manual_home_link() %>
4
+ &gt; <a href="<%= library_index_url() %>"><%= _('All Libraries') %></a>
5
+ &gt; <%= friendly_library_name(@entry.name) %>
6
+ </p>
7
+ <%
8
+ headline_init
9
+ %>
10
+ <%= headline(@entry.id == '_builtin' ? _('Builtin Library') : "library #{@entry.name}") %>
11
+
12
+ <%
13
+ headline_push
14
+ required_classes = (@entry.sublibraries & @entry.requires).map{|lib| lib.classes }.flatten
15
+ all_classes = (@entry.classes + required_classes).uniq.sort
16
+ err_classes = all_classes.select {|c| c.ancestors.any?{|k| k.name == 'Exception' }}.sort
17
+ modules = all_classes.select{|c| c.module? }.sort
18
+ objects = all_classes.select{|c| c.object? }.sort
19
+ classes = (all_classes - err_classes - modules - objects).sort
20
+
21
+ class_tree = classes.group_by{|c| c.superclass }
22
+ class_root = class_tree.keys.select{|c| !c || !classes.include?(c)}
23
+ class_root.map!{|c| class_tree[c] }.flatten!
24
+ err_class_tree = err_classes.group_by{|c| c.superclass }
25
+ err_class_root = err_class_tree.keys.select{|c| !c || !err_classes.include?(c)}
26
+ err_class_root.map!{|c| err_class_tree[c] }.flatten!
27
+ %>
28
+
29
+
30
+ <%= headline(_("Abstract")) %>
31
+ <%= compile_rd(@entry.source) %>
32
+ <% draw_tree = proc do |list, tree, indent = 0| %>
33
+ <tr>
34
+ <% list.each do |c| %>
35
+ <td class="signature" style="text-indent: <%= indent * 1.0%>em;"><span style="display:none"><%= "&nbsp;" * indent %></span>
36
+ <%= class_link(c.name, c.name) %></td>
37
+ <td class="description"><%= compile_rd(c.synopsis_source) %></td>
38
+ </tr>
39
+ <%
40
+ tree && tree[c] && draw_tree.call(tree[c], tree, indent + 1)
41
+ end
42
+ end
43
+ %>
44
+ <%
45
+ [[class_root, class_tree , _('Classes')],
46
+ [modules, nil , _('Modules')],
47
+ [objects, nil , _('Objects')],
48
+ [err_class_root, err_class_tree, _('Exception Classes')]].each do |cs, tree, msg|
49
+ unless cs.empty?
50
+ %>
51
+ <%= headline(msg) %>
52
+ <table class="entries libraries">
53
+ <% draw_tree.call(cs, tree) %>
54
+ </table>
55
+ <%
56
+ end
57
+ end
58
+ %>
59
+ <%
60
+ [[@entry.requires.sort, _('Required Libraries')],
61
+ [(@entry.sublibraries - @entry.requires).sort, _('Sub-Libraries')]].each do |cs, msg|
62
+ unless cs.empty?
63
+ %>
64
+ <%= headline(msg) %>
65
+ <table class="entries libraries">
66
+ <% cs.each do |c| %>
67
+ <tr>
68
+ <td class="signature"><%= library_link(c.name) %></td>
69
+ <td class="description"><%= compile_rd(c.synopsis_source) %></td>
70
+ </tr>
71
+ <% end %>
72
+ </table>
73
+ <%
74
+ end
75
+ end
76
+ %>
77
+ <%
78
+ ents = @entry.methods.sort
79
+ unless ents.empty? %>
80
+ <%= headline(_("Added/Redefined Methods")) %>
81
+ <p><code>
82
+ <% ents.each do |m| %>
83
+ <%= link_to_method(m, true) %>
84
+ <% end %>
85
+ </code></p>
86
+ <% end %>
87
+
@@ -0,0 +1,32 @@
1
+ <% @title = _('Library Index') %>
2
+ <p>
3
+ <%= manual_home_link() %>
4
+ &gt; <%= _("All Libraries") %>
5
+ </p>
6
+ <%
7
+ headline_init
8
+ %>
9
+ <%= headline(_("Library Index")) %>
10
+ <table class="entries libraries">
11
+ <%
12
+ headline_push
13
+ lib = @entries.detect {|lib| lib.id == '_builtin' }
14
+ %>
15
+ <tr>
16
+ <td class="signature"><%= library_link(lib.name, _('Builtin Library')) %></td>
17
+ <td class="description"><%= compile_rd(lib.synopsis_source) %></td>
18
+ </tr>
19
+ <%
20
+ @entries.each do |lib|
21
+ next if lib.id == '_builtin'
22
+ next if lib.is_sublibrary
23
+ %>
24
+ <tr>
25
+ <td class="signature"><%= library_link(lib.name) %></td>
26
+ <td class="description"><%= compile_rd(lib.synopsis_source) %></td>
27
+ </tr>
28
+ <%
29
+ end
30
+ headline_pop
31
+ %>
32
+ </table>
@@ -0,0 +1,21 @@
1
+ <%
2
+ entry = @entries.sort.first
3
+ @title = "#{entry.type_label} #{entry.label}"
4
+ %>
5
+ <p>
6
+ <%= manual_home_link() %>
7
+ &gt; <a href="<%= library_index_url() %>"><%= _('All Libraries') %></a>
8
+ &gt; <%= friendly_library_link(entry.library.name) %>
9
+ &gt; <%= class_link(entry.klass.name, _(entry.klass.type.to_s + ' %s', entry.klass.name)) %>
10
+ &gt; <% if entry.typename == :special_variable %>$<% end %><%=h entry.name %>
11
+ <% unless entry.really_public? %>(<%= entry.visibility %>)<% end %>
12
+ </p>
13
+
14
+ <% headline_init %>
15
+ <%= headline("#{entry.type_label} #{entry.label}") %>
16
+ <dl class="methodlist">
17
+ <% @entries.sort.each do |ent| %>
18
+ <%= compile_method(ent) %>
19
+ <% end %>
20
+ </dl>
21
+
@@ -0,0 +1,6 @@
1
+ <%
2
+ headline_init
3
+ headline_push
4
+ headline_push
5
+ %>
6
+ <%= compile_rd(@source) %>
@@ -0,0 +1,133 @@
1
+ <% @title = "#{@entry.type} #{@entry.name}" %>
2
+ <p>
3
+ <%= manual_home_link() %>
4
+ &gt; <a href="<%= library_index_url() %>"><%= _('All Libraries') %></a>
5
+ &gt; <%= friendly_library_link(@entry.library.name) %>
6
+ &gt; <%=h _(@entry.type.to_s + ' %s', @entry.name) %>
7
+ </p>
8
+ <%= search_form() %>
9
+
10
+ <%
11
+ headline_init
12
+ %>
13
+ <%= headline("#{@entry.type} #{@entry.name}" + @entry.ancestors[1..@alevel].map{|c| " + #{c.name}" }.join) %>
14
+ <p>
15
+ <%
16
+ myself, *supers = @entry.ancestors
17
+ n = 0
18
+ %>
19
+ <% unless @entry.alias? %>
20
+ <%= _('ancestors') %>: <%= escape_html(myself.name) %>
21
+ <% supers.each do |c| %>
22
+ <%= @conf[:tochm_mode] ? "&lt;" : a_href("?a=#{n}", "<") %> <%= class_link(c.name) %>
23
+ <% n += 1 %>
24
+ <% end %>
25
+ <% end %>
26
+
27
+ <% unless @entry.extended.empty? %>
28
+ <br>extend: <%= @entry.extended.map {|c| class_link(c.name) }.join(', ') %>
29
+ <% end %>
30
+ <% unless @entry.aliases.empty? %>
31
+ <br>aliases: <%=h @entry.aliases.map{|c| c.name}.join(', ') %>
32
+ <% end %>
33
+ </p>
34
+ <%
35
+ headline_push
36
+ %>
37
+ <%= headline(_("Abstract")) %>
38
+ <%= compile_rd(@entry.source) %>
39
+
40
+ <%
41
+ ents = @entry.partitioned_entries(@alevel)
42
+ [[_('Singleton Methods'), ents.singleton_methods ],
43
+ [_('Instance Methods'), ents.instance_methods ],
44
+ [_('Private Singleton Methods'), ents.private_singleton_methods ],
45
+ [_('Private Instance Methods'), ents.private_instance_methods ],
46
+ [_('Module Functions'), ents.module_functions ],
47
+ [_('Constants'), ents.constants ],
48
+ [_('Special Variables'), ents.special_variables ]]\
49
+ .each do |label, entries|
50
+ unless entries.empty? %>
51
+ <%= headline(label) %>
52
+ <table class="entries methods">
53
+ <tr>
54
+ <th><%= _('Signature') %></th>
55
+ <th colspan="2"><%= _('Description') %></th>
56
+ </tr>
57
+ <%
58
+ headline_push
59
+ entries.each do |m|
60
+ foreach_method_chunk(m.source) do |sigs, src| %>
61
+ <tr>
62
+ <td class="signature">
63
+ <a href="<%=h method_url(m.spec_string) %>"><code>
64
+ <%= sigs.map {|sig| h(sig.friendly_string) }.join("<br>") %>
65
+ </code></a>
66
+ </td>
67
+ <% if m.redefined? %>
68
+ <td class="description"><%= compile_rd(src) %></td>
69
+ <td class="library"><%= library_link(m.library.name) %></td>
70
+ <% elsif @entry.name != m.klass.name %>
71
+ <td class="description"><%= compile_rd(src) %></td>
72
+ <td class="library"><%= class_link(m.klass.name) %></td>
73
+ <% else %>
74
+ <td class="description" colspan="2"><%= compile_rd(src) %></td>
75
+ <% end %>
76
+ </tr>
77
+ <%
78
+ end
79
+ end
80
+ headline_pop
81
+ %>
82
+ </table>
83
+ <%
84
+ end
85
+ end
86
+ %>
87
+
88
+ <% specs = @entry.inherited_method_specs.sort
89
+ unless specs.empty? %>
90
+ <%= headline(_('Inherited Methods')) %>
91
+ <p><code>
92
+ <% specs.each do |s| %>
93
+ <%= method_link(s.to_s, (s.type == '#' ? s.method : s.type + s.method)) %>
94
+ <% end %>
95
+ </code></p>
96
+ <% end %>
97
+
98
+ <%
99
+ [[_('Added Methods'), ents.added]]\
100
+ .each do |label, entries|
101
+ unless entries.empty? %>
102
+ <%= headline(label) %>
103
+ <table class="entries methods">
104
+ <tr>
105
+ <th><%= _('Signature') %></th>
106
+ <th><%= _('Description') %></th>
107
+ <th><%= _('Library') %></th>
108
+ </tr>
109
+ <%
110
+ headline_push
111
+ entries.each do |m|
112
+ foreach_method_chunk(m.source) do |sigs, src| %>
113
+ <tr>
114
+ <td class="signature">
115
+ <a href="<%=h method_url(m.spec_string) %>"><code>
116
+ <%= sigs.map {|sig| h(sig.friendly_string) }.join("<br>") %>
117
+ </code></a>
118
+ </td>
119
+ <td class="description"><%= compile_rd(src) %></td>
120
+ <td class="library"><%= library_link(m.library.name) %></td>
121
+ </tr>
122
+ <%
123
+ end
124
+ end
125
+ headline_pop
126
+ %>
127
+ </table>
128
+ <%
129
+ end
130
+ end
131
+ headline_pop
132
+ %>
133
+
@@ -0,0 +1,30 @@
1
+ <% @title = _('Class Index') %>
2
+ <p>
3
+ <%= manual_home_link() %>
4
+ &gt; <%= _('All Classes') %>
5
+ </p>
6
+ <%= search_form() %>
7
+ <%
8
+ headline_init
9
+ %>
10
+ <%= headline(_("Class Index")) %>
11
+ <p>
12
+ <%= @entries.size %> classes/modules in database
13
+ </p>
14
+ <%
15
+ headline_push
16
+ @entries.each do |c|
17
+ %>
18
+ <%= headline_noescape("#{c.type} #{class_link(c.name)}") %>
19
+ <p>
20
+ <%
21
+ c.entries.sort.each do |m| %>
22
+ <%= link_to_method(m) %>
23
+ <% end %>
24
+ </p>
25
+ <%
26
+ end
27
+ headline_pop
28
+ %>
29
+ </ul>
30
+
@@ -0,0 +1,14 @@
1
+ <% @title = @entry.title %>
2
+ <p>
3
+ <% if @entry.name == 'index' %>
4
+ <%= _('Ruby %s Reference Manual', ruby_version()) %>
5
+ <% else %>
6
+ <%= manual_home_link() %>
7
+ &gt; <%=h @entry.name %>
8
+ <% end %>
9
+ </p>
10
+ <%= search_form() %>
11
+ <% headline_init %>
12
+ <%= headline(@entry.title) %>
13
+ <% headline_push %>
14
+ <%= compile_rd(@entry.source) %>
@@ -0,0 +1,21 @@
1
+ <% @title = "#{@entry.type_label} #{@entry.label}" %>
2
+ <p>
3
+ <%= manual_home_link() %>
4
+ &gt; <a href="<%= function_index_url() %>"><%= _('All Functions') %></a>
5
+ &gt; <%=h @entry.name %>
6
+ <% unless @entry.public? %>(static)<% end %>
7
+ </p>
8
+ <%= search_form() %>
9
+
10
+ <% headline_init %>
11
+ <%= headline("#{@entry.type_label} #{@entry.label}") %>
12
+ <dl class="functionlist">
13
+ <dt>
14
+ <code><%=h @entry.header %></code>
15
+ <% if @entry.macro? then %>[MACRO]<% end %>
16
+ </dt>
17
+ <dd>
18
+ <%= compile_function(@entry) %>
19
+ </dd>
20
+ </dl>
21
+
@@ -0,0 +1,25 @@
1
+ <% @title = _('Function Index') %>
2
+ <p>
3
+ <%= manual_home_link() %>
4
+ &gt; <%= _('All Functions') %>
5
+ </p>
6
+ <%= search_form() %>
7
+ <%
8
+ headline_init
9
+ %>
10
+ <%= headline(_("Function Index")) %>
11
+ <table class="entries functions">
12
+ <%
13
+ headline_push
14
+ @entries.each do |f|
15
+ %>
16
+ <tr>
17
+ <td class="signature"><%= function_link(f.name) %></td>
18
+ <td class="description"><%= compile_rd(f.synopsis_source) %></td>
19
+ </tr>
20
+ <%
21
+ end
22
+ headline_pop
23
+ %>
24
+ </table>
25
+
@@ -0,0 +1,19 @@
1
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2
+ <html lang="ja-JP">
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=<%=h charset() %>">
5
+ <meta http-equiv="Content-Language" content="ja-JP">
6
+ <link rel="stylesheet" type="text/css" href="<%=h css_url() %>">
7
+ <link rel="icon" type="image/png" href="<%=h favicon_url() %>">
8
+ <title><%=h @title %></title>
9
+ <link rel="search" type="application/opensearchdescription+xml" title="<%= _('Ruby %s Reference Manual', ruby_version()) %>" href="<%=h opensearchdescription_url() %>">
10
+ </head>
11
+ <body>
12
+ <%= yield %>
13
+ <div id="footer">
14
+ <a rel="license" href="http://creativecommons.org/licenses/by/3.0/">
15
+ <img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by/3.0/88x31.png" />
16
+ </a>
17
+ </div>
18
+ </body>
19
+ </html>
@@ -0,0 +1,89 @@
1
+ <% @title = "library #{@entry.name}" %>
2
+ <p>
3
+ <%= manual_home_link() %>
4
+ &gt; <a href="<%= library_index_url() %>"><%= _('All Libraries') %></a>
5
+ &gt; <%= friendly_library_name(@entry.name) %>
6
+ </p>
7
+ <%= search_form() %>
8
+
9
+ <%
10
+ headline_init
11
+ %>
12
+ <%= headline(@entry.id == '_builtin' ? _('Builtin Library') : "library #{@entry.name}") %>
13
+
14
+ <%
15
+ headline_push
16
+ required_classes = (@entry.sublibraries & @entry.requires).map{|lib| lib.classes }.flatten
17
+ all_classes = (@entry.classes + required_classes).uniq.sort
18
+ err_classes = all_classes.select {|c| c.ancestors.any?{|k| k.name == 'Exception' }}.sort
19
+ modules = all_classes.select{|c| c.module? }.sort
20
+ objects = all_classes.select{|c| c.object? }.sort
21
+ classes = (all_classes - err_classes - modules - objects).sort
22
+
23
+ class_tree = classes.group_by{|c| c.superclass }
24
+ class_root = class_tree.keys.select{|c| !c || !classes.include?(c)}
25
+ class_root.map!{|c| class_tree[c] }.flatten!
26
+ err_class_tree = err_classes.group_by{|c| c.superclass }
27
+ err_class_root = err_class_tree.keys.select{|c| !c || !err_classes.include?(c)}
28
+ err_class_root.map!{|c| err_class_tree[c] }.flatten!
29
+ %>
30
+
31
+
32
+ <%= headline(_("Abstract")) %>
33
+ <%= compile_rd(@entry.source) %>
34
+ <% draw_tree = proc do |list, tree, indent = 0| %>
35
+ <tr>
36
+ <% list.each do |c| %>
37
+ <td class="signature" style="text-indent: <%= indent * 1.0%>em;"><span style="display:none"><%= "&nbsp;" * indent %></span>
38
+ <%= class_link(c.name, c.name) %></td>
39
+ <td class="description"><%= compile_rd(c.synopsis_source) %></td>
40
+ </tr>
41
+ <%
42
+ tree && tree[c] && draw_tree.call(tree[c], tree, indent + 1)
43
+ end
44
+ end
45
+ %>
46
+ <%
47
+ [[class_root, class_tree , _('Classes')],
48
+ [modules, nil , _('Modules')],
49
+ [objects, nil , _('Objects')],
50
+ [err_class_root, err_class_tree, _('Exception Classes')]].each do |cs, tree, msg|
51
+ unless cs.empty?
52
+ %>
53
+ <%= headline(msg) %>
54
+ <table class="entries libraries">
55
+ <% draw_tree.call(cs, tree) %>
56
+ </table>
57
+ <%
58
+ end
59
+ end
60
+ %>
61
+ <%
62
+ [[@entry.requires.sort, _('Required Libraries')],
63
+ [(@entry.sublibraries - @entry.requires).sort, _('Sub-Libraries')]].each do |cs, msg|
64
+ unless cs.empty?
65
+ %>
66
+ <%= headline(msg) %>
67
+ <table class="entries libraries">
68
+ <% cs.each do |c| %>
69
+ <tr>
70
+ <td class="signature"><%= library_link(c.name) %></td>
71
+ <td class="description"><%= compile_rd(c.synopsis_source) %></td>
72
+ </tr>
73
+ <% end %>
74
+ </table>
75
+ <%
76
+ end
77
+ end
78
+ %>
79
+ <%
80
+ ents = @entry.methods.sort
81
+ unless ents.empty? %>
82
+ <%= headline(_("Added/Redefined Methods")) %>
83
+ <p><code>
84
+ <% ents.each do |m| %>
85
+ <%= link_to_method(m, true) %>
86
+ <% end %>
87
+ </code></p>
88
+ <% end %>
89
+