voloko-sdoc 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (95) hide show
  1. data/rdoc/History.txt +254 -0
  2. data/rdoc/Manifest.txt +126 -0
  3. data/rdoc/README.txt +47 -0
  4. data/rdoc/RI.txt +58 -0
  5. data/rdoc/Rakefile +70 -0
  6. data/rdoc/bin/rdoc +35 -0
  7. data/rdoc/bin/ri +5 -0
  8. data/rdoc/lib/rdoc/alias.rb +54 -0
  9. data/rdoc/lib/rdoc/anon_class.rb +10 -0
  10. data/rdoc/lib/rdoc/any_method.rb +190 -0
  11. data/rdoc/lib/rdoc/attr.rb +79 -0
  12. data/rdoc/lib/rdoc/cache.rb +41 -0
  13. data/rdoc/lib/rdoc/class_module.rb +87 -0
  14. data/rdoc/lib/rdoc/code_object.rb +152 -0
  15. data/rdoc/lib/rdoc/code_objects.rb +23 -0
  16. data/rdoc/lib/rdoc/constant.rb +36 -0
  17. data/rdoc/lib/rdoc/context.rb +712 -0
  18. data/rdoc/lib/rdoc/diagram.rb +340 -0
  19. data/rdoc/lib/rdoc/dot.rb +249 -0
  20. data/rdoc/lib/rdoc/generator/darkfish.rb +455 -0
  21. data/rdoc/lib/rdoc/generator/markup.rb +194 -0
  22. data/rdoc/lib/rdoc/generator/ri.rb +230 -0
  23. data/rdoc/lib/rdoc/generator/template/darkfish/classpage.rhtml +281 -0
  24. data/rdoc/lib/rdoc/generator/template/darkfish/filepage.rhtml +112 -0
  25. data/rdoc/lib/rdoc/generator/template/darkfish/images/brick.png +0 -0
  26. data/rdoc/lib/rdoc/generator/template/darkfish/images/brick_link.png +0 -0
  27. data/rdoc/lib/rdoc/generator/template/darkfish/images/bug.png +0 -0
  28. data/rdoc/lib/rdoc/generator/template/darkfish/images/bullet_black.png +0 -0
  29. data/rdoc/lib/rdoc/generator/template/darkfish/images/bullet_toggle_minus.png +0 -0
  30. data/rdoc/lib/rdoc/generator/template/darkfish/images/bullet_toggle_plus.png +0 -0
  31. data/rdoc/lib/rdoc/generator/template/darkfish/images/date.png +0 -0
  32. data/rdoc/lib/rdoc/generator/template/darkfish/images/find.png +0 -0
  33. data/rdoc/lib/rdoc/generator/template/darkfish/images/loadingAnimation.gif +0 -0
  34. data/rdoc/lib/rdoc/generator/template/darkfish/images/macFFBgHack.png +0 -0
  35. data/rdoc/lib/rdoc/generator/template/darkfish/images/package.png +0 -0
  36. data/rdoc/lib/rdoc/generator/template/darkfish/images/page_green.png +0 -0
  37. data/rdoc/lib/rdoc/generator/template/darkfish/images/page_white_text.png +0 -0
  38. data/rdoc/lib/rdoc/generator/template/darkfish/images/page_white_width.png +0 -0
  39. data/rdoc/lib/rdoc/generator/template/darkfish/images/plugin.png +0 -0
  40. data/rdoc/lib/rdoc/generator/template/darkfish/images/ruby.png +0 -0
  41. data/rdoc/lib/rdoc/generator/template/darkfish/images/tag_green.png +0 -0
  42. data/rdoc/lib/rdoc/generator/template/darkfish/images/wrench.png +0 -0
  43. data/rdoc/lib/rdoc/generator/template/darkfish/images/wrench_orange.png +0 -0
  44. data/rdoc/lib/rdoc/generator/template/darkfish/images/zoom.png +0 -0
  45. data/rdoc/lib/rdoc/generator/template/darkfish/index.rhtml +64 -0
  46. data/rdoc/lib/rdoc/generator/template/darkfish/js/darkfish.js +116 -0
  47. data/rdoc/lib/rdoc/generator/template/darkfish/js/jquery.js +32 -0
  48. data/rdoc/lib/rdoc/generator/template/darkfish/js/quicksearch.js +114 -0
  49. data/rdoc/lib/rdoc/generator/template/darkfish/js/thickbox-compressed.js +10 -0
  50. data/rdoc/lib/rdoc/generator/template/darkfish/rdoc.css +696 -0
  51. data/rdoc/lib/rdoc/generator.rb +8 -0
  52. data/rdoc/lib/rdoc/ghost_method.rb +8 -0
  53. data/rdoc/lib/rdoc/include.rb +39 -0
  54. data/rdoc/lib/rdoc/known_classes.rb +68 -0
  55. data/rdoc/lib/rdoc/markup/attribute_manager.rb +311 -0
  56. data/rdoc/lib/rdoc/markup/formatter.rb +25 -0
  57. data/rdoc/lib/rdoc/markup/fragments.rb +377 -0
  58. data/rdoc/lib/rdoc/markup/inline.rb +126 -0
  59. data/rdoc/lib/rdoc/markup/lines.rb +156 -0
  60. data/rdoc/lib/rdoc/markup/preprocess.rb +80 -0
  61. data/rdoc/lib/rdoc/markup/to_flow.rb +211 -0
  62. data/rdoc/lib/rdoc/markup/to_html.rb +406 -0
  63. data/rdoc/lib/rdoc/markup/to_html_crossref.rb +140 -0
  64. data/rdoc/lib/rdoc/markup/to_latex.rb +328 -0
  65. data/rdoc/lib/rdoc/markup/to_test.rb +53 -0
  66. data/rdoc/lib/rdoc/markup/to_texinfo.rb +73 -0
  67. data/rdoc/lib/rdoc/markup.rb +378 -0
  68. data/rdoc/lib/rdoc/meta_method.rb +8 -0
  69. data/rdoc/lib/rdoc/normal_class.rb +18 -0
  70. data/rdoc/lib/rdoc/normal_module.rb +34 -0
  71. data/rdoc/lib/rdoc/options.rb +542 -0
  72. data/rdoc/lib/rdoc/parser/c.rb +678 -0
  73. data/rdoc/lib/rdoc/parser/perl.rb +165 -0
  74. data/rdoc/lib/rdoc/parser/ruby.rb +2904 -0
  75. data/rdoc/lib/rdoc/parser/simple.rb +39 -0
  76. data/rdoc/lib/rdoc/parser.rb +138 -0
  77. data/rdoc/lib/rdoc/rdoc.rb +375 -0
  78. data/rdoc/lib/rdoc/require.rb +32 -0
  79. data/rdoc/lib/rdoc/ri/cache.rb +187 -0
  80. data/rdoc/lib/rdoc/ri/descriptions.rb +156 -0
  81. data/rdoc/lib/rdoc/ri/display.rb +340 -0
  82. data/rdoc/lib/rdoc/ri/driver.rb +828 -0
  83. data/rdoc/lib/rdoc/ri/formatter.rb +654 -0
  84. data/rdoc/lib/rdoc/ri/paths.rb +93 -0
  85. data/rdoc/lib/rdoc/ri/reader.rb +106 -0
  86. data/rdoc/lib/rdoc/ri/util.rb +79 -0
  87. data/rdoc/lib/rdoc/ri/writer.rb +68 -0
  88. data/rdoc/lib/rdoc/ri.rb +8 -0
  89. data/rdoc/lib/rdoc/single_class.rb +8 -0
  90. data/rdoc/lib/rdoc/stats.rb +178 -0
  91. data/rdoc/lib/rdoc/task.rb +276 -0
  92. data/rdoc/lib/rdoc/tokenstream.rb +33 -0
  93. data/rdoc/lib/rdoc/top_level.rb +242 -0
  94. data/rdoc/lib/rdoc.rb +398 -0
  95. metadata +1 -1
@@ -0,0 +1,230 @@
1
+ require 'rdoc/generator'
2
+ require 'rdoc/markup/to_flow'
3
+
4
+ require 'rdoc/ri/cache'
5
+ require 'rdoc/ri/reader'
6
+ require 'rdoc/ri/writer'
7
+ require 'rdoc/ri/descriptions'
8
+
9
+ class RDoc::Generator::RI
10
+
11
+ RDoc::RDoc.add_generator self
12
+
13
+ ##
14
+ # Generator may need to return specific subclasses depending on the
15
+ # options they are passed. Because of this we create them using a factory
16
+
17
+ def self.for(options)
18
+ new(options)
19
+ end
20
+
21
+ ##
22
+ # Set up a new ri generator
23
+
24
+ def initialize(options) #:not-new:
25
+ @options = options
26
+ @ri_writer = RDoc::RI::Writer.new "."
27
+ @markup = RDoc::Markup.new
28
+ @to_flow = RDoc::Markup::ToFlow.new
29
+
30
+ @generated = {}
31
+ end
32
+
33
+ ##
34
+ # Build the initial indices and output objects based on an array of
35
+ # TopLevel objects containing the extracted information.
36
+
37
+ def generate(top_levels)
38
+ RDoc::TopLevel.all_classes_and_modules.each do |cls|
39
+ process_class cls
40
+ end
41
+ end
42
+
43
+ def process_class(from_class)
44
+ generate_class_info(from_class)
45
+
46
+ # now recurse into this class' constituent classes
47
+ from_class.each_classmodule do |mod|
48
+ process_class(mod)
49
+ end
50
+ end
51
+
52
+ def generate_class_info(cls)
53
+ case cls
54
+ when RDoc::NormalModule then
55
+ cls_desc = RDoc::RI::ModuleDescription.new
56
+ else
57
+ cls_desc = RDoc::RI::ClassDescription.new
58
+ superclass = cls.superclass
59
+ superclass = superclass.full_name unless String === superclass
60
+ cls_desc.superclass = superclass
61
+ end
62
+
63
+ cls_desc.name = cls.name
64
+ cls_desc.full_name = cls.full_name
65
+ cls_desc.comment = markup(cls.comment)
66
+
67
+ cls_desc.attributes = cls.attributes.sort.map do |a|
68
+ RDoc::RI::Attribute.new(a.name, a.rw, markup(a.comment))
69
+ end
70
+
71
+ cls_desc.constants = cls.constants.map do |c|
72
+ RDoc::RI::Constant.new(c.name, c.value, markup(c.comment))
73
+ end
74
+
75
+ cls_desc.includes = cls.includes.map do |i|
76
+ RDoc::RI::IncludedModule.new(i.name)
77
+ end
78
+
79
+ class_methods, instance_methods = method_list(cls)
80
+
81
+ cls_desc.class_methods = class_methods.map do |m|
82
+ RDoc::RI::MethodSummary.new(m.name)
83
+ end
84
+
85
+ cls_desc.instance_methods = instance_methods.map do |m|
86
+ RDoc::RI::MethodSummary.new(m.name)
87
+ end
88
+
89
+ update_or_replace(cls_desc)
90
+
91
+ class_methods.each do |m|
92
+ generate_method_info(cls_desc, m)
93
+ end
94
+
95
+ instance_methods.each do |m|
96
+ generate_method_info(cls_desc, m)
97
+ end
98
+ end
99
+
100
+ def generate_method_info(cls_desc, method)
101
+ meth_desc = RDoc::RI::MethodDescription.new
102
+ meth_desc.name = method.name
103
+ meth_desc.full_name = cls_desc.full_name
104
+ if method.singleton
105
+ meth_desc.full_name += "::"
106
+ else
107
+ meth_desc.full_name += "#"
108
+ end
109
+ meth_desc.full_name << method.name
110
+
111
+ meth_desc.comment = markup(method.comment)
112
+ meth_desc.params = params_of(method)
113
+ meth_desc.visibility = method.visibility.to_s
114
+ meth_desc.is_singleton = method.singleton
115
+ meth_desc.block_params = method.block_params
116
+
117
+ meth_desc.aliases = method.aliases.map do |a|
118
+ RDoc::RI::AliasName.new(a.name)
119
+ end
120
+
121
+ @ri_writer.add_method(cls_desc, meth_desc)
122
+ end
123
+
124
+ private
125
+
126
+ ##
127
+ # Returns a list of class and instance methods that we'll be documenting
128
+
129
+ def method_list(cls)
130
+ list = cls.method_list
131
+ unless @options.show_all
132
+ list = list.find_all do |m|
133
+ m.visibility == :public || m.visibility == :protected || m.force_documentation
134
+ end
135
+ end
136
+
137
+ c = []
138
+ i = []
139
+ list.sort.each do |m|
140
+ if m.singleton
141
+ c << m
142
+ else
143
+ i << m
144
+ end
145
+ end
146
+ return c,i
147
+ end
148
+
149
+ def params_of(method)
150
+ if method.call_seq
151
+ method.call_seq
152
+ else
153
+ params = method.params || ""
154
+
155
+ p = params.gsub(/\s*\#.*/, '')
156
+ p = p.tr("\n", " ").squeeze(" ")
157
+ p = "(" + p + ")" unless p[0] == ?(
158
+
159
+ if (block = method.block_params)
160
+ block.gsub!(/\s*\#.*/, '')
161
+ block = block.tr("\n", " ").squeeze(" ")
162
+ if block[0] == ?(
163
+ block.sub!(/^\(/, '').sub!(/\)/, '')
164
+ end
165
+ p << " {|#{block.strip}| ...}"
166
+ end
167
+ p
168
+ end
169
+ end
170
+
171
+ def markup(comment)
172
+ return nil if !comment || comment.empty?
173
+
174
+ # Convert leading comment markers to spaces, but only
175
+ # if all non-blank lines have them
176
+
177
+ if comment =~ /^(?>\s*)[^\#]/
178
+ content = comment
179
+ else
180
+ content = comment.gsub(/^\s*(#+)/) { $1.tr('#',' ') }
181
+ end
182
+ @markup.convert(content, @to_flow)
183
+ end
184
+
185
+ ##
186
+ # By default we replace existing classes with the same name. If the
187
+ # --merge option was given, we instead merge this definition into an
188
+ # existing class. We add our methods, aliases, etc to that class, but do
189
+ # not change the class's description.
190
+
191
+ def update_or_replace(cls_desc)
192
+ old_cls = nil
193
+
194
+ if @options.merge
195
+ rdr = RDoc::RI::Reader.new RDoc::RI::Cache.new(@options.op_dir)
196
+
197
+ namespace = rdr.top_level_namespace
198
+ namespace = rdr.lookup_namespace_in(cls_desc.name, namespace)
199
+ if namespace.empty?
200
+ $stderr.puts "You asked me to merge this source into existing "
201
+ $stderr.puts "documentation. This file references a class or "
202
+ $stderr.puts "module called #{cls_desc.name} which I don't"
203
+ $stderr.puts "have existing documentation for."
204
+ $stderr.puts
205
+ $stderr.puts "Perhaps you need to generate its documentation first"
206
+ exit 1
207
+ else
208
+ old_cls = namespace[0]
209
+ end
210
+ end
211
+
212
+ prev_cls = @generated[cls_desc.full_name]
213
+
214
+ if old_cls and not prev_cls then
215
+ old_desc = rdr.get_class old_cls
216
+ cls_desc.merge_in old_desc
217
+ end
218
+
219
+ if prev_cls then
220
+ cls_desc.merge_in prev_cls
221
+ end
222
+
223
+ @generated[cls_desc.full_name] = cls_desc
224
+
225
+ @ri_writer.remove_class cls_desc
226
+ @ri_writer.add_class cls_desc
227
+ end
228
+
229
+ end
230
+
@@ -0,0 +1,281 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
+ <head>
6
+ <meta content="text/html; charset=<%= @options.charset %>" http-equiv="Content-Type" />
7
+
8
+ <title><%= klass.type.capitalize %>: <%= klass.full_name %></title>
9
+
10
+ <link rel="stylesheet" href="<%= rel_prefix %>/rdoc.css" type="text/css" media="screen" />
11
+
12
+ <script src="<%= rel_prefix %>/js/jquery.js" type="text/javascript"
13
+ charset="utf-8"></script>
14
+ <script src="<%= rel_prefix %>/js/thickbox-compressed.js" type="text/javascript"
15
+ charset="utf-8"></script>
16
+ <script src="<%= rel_prefix %>/js/quicksearch.js" type="text/javascript"
17
+ charset="utf-8"></script>
18
+ <script src="<%= rel_prefix %>/js/darkfish.js" type="text/javascript"
19
+ charset="utf-8"></script>
20
+
21
+ </head>
22
+ <body class="<%= klass.type %>">
23
+
24
+ <div id="metadata">
25
+ <div id="file-metadata">
26
+ <div id="file-list-section" class="section">
27
+ <h3 class="section-header">In Files</h3>
28
+ <div class="section-body">
29
+ <ul>
30
+ <% klass.in_files.each do |tl| %>
31
+ <li><a href="<%= rel_prefix %>/<%= h tl.path %>.html?TB_iframe=true&amp;height=550&amp;width=785"
32
+ class="thickbox" title="<%= h tl.absolute_name %>"><%= h tl.absolute_name %></a></li>
33
+ <% end %>
34
+ </ul>
35
+ </div>
36
+ </div>
37
+
38
+ <% if !svninfo.empty? %>
39
+ <div id="file-svninfo-section" class="section">
40
+ <h3 class="section-header">Subversion Info</h3>
41
+ <div class="section-body">
42
+ <dl class="svninfo">
43
+ <dt>Rev</dt>
44
+ <dd><%= svninfo[:rev] %></dd>
45
+
46
+ <dt>Last Checked In</dt>
47
+ <dd><%= svninfo[:commitdate].strftime('%Y-%m-%d %H:%M:%S') %>
48
+ (<%= svninfo[:commitdelta] %> ago)</dd>
49
+
50
+ <dt>Checked in by</dt>
51
+ <dd><%= svninfo[:committer] %></dd>
52
+ </dl>
53
+ </div>
54
+ </div>
55
+ <% end %>
56
+ </div>
57
+
58
+ <div id="class-metadata">
59
+
60
+ <!-- Parent Class -->
61
+ <% if klass.type == 'class' %>
62
+ <div id="parent-class-section" class="section">
63
+ <h3 class="section-header">Parent</h3>
64
+ <% unless String === klass.superclass %>
65
+ <p class="link"><a href="<%= klass.aref_to klass.superclass.path %>"><%= klass.superclass.full_name %></a></p>
66
+ <% else %>
67
+ <p class="link"><%= klass.superclass %></p>
68
+ <% end %>
69
+ </div>
70
+ <% end %>
71
+
72
+ <!-- Namespace Contents -->
73
+ <% unless klass.classes_and_modules.empty? %>
74
+ <div id="namespace-list-section" class="section">
75
+ <h3 class="section-header">Namespace</h3>
76
+ <ul class="link-list">
77
+ <% (klass.modules.sort + klass.classes.sort).each do |mod| %>
78
+ <li><span class="type"><%= mod.type.upcase %></span> <a href="<%= klass.aref_to mod.path %>"><%= mod.full_name %></a></li>
79
+ <% end %>
80
+ </ul>
81
+ </div>
82
+ <% end %>
83
+
84
+ <!-- Method Quickref -->
85
+ <% unless klass.method_list.empty? %>
86
+ <div id="method-list-section" class="section">
87
+ <h3 class="section-header">Methods</h3>
88
+ <ul class="link-list">
89
+ <% klass.each_method do |meth| %>
90
+ <li><a href="#<%= meth.aref %>"><%= meth.singleton ? '::' : '#' %><%= meth.name %></a></li>
91
+ <% end %>
92
+ </ul>
93
+ </div>
94
+ <% end %>
95
+
96
+ <!-- Included Modules -->
97
+ <% unless klass.includes.empty? %>
98
+ <div id="includes-section" class="section">
99
+ <h3 class="section-header">Included Modules</h3>
100
+ <ul class="link-list">
101
+ <% klass.each_include do |inc| %>
102
+ <% unless String === inc.module %>
103
+ <li><a class="include" href="<%= klass.aref_to inc.module.path %>"><%= inc.module.full_name %></a></li>
104
+ <% else %>
105
+ <li><span class="include"><%= inc.name %></span></li>
106
+ <% end %>
107
+ <% end %>
108
+ </ul>
109
+ </div>
110
+ <% end %>
111
+ </div>
112
+
113
+ <div id="project-metadata">
114
+ <% simple_files = @files.select {|tl| tl.parser == RDoc::Parser::Simple } %>
115
+ <% unless simple_files.empty? then %>
116
+ <div id="fileindex-section" class="section project-section">
117
+ <h3 class="section-header">Files</h3>
118
+ <ul>
119
+ <% simple_files.each do |file| %>
120
+ <li class="file"><a href="<%= rel_prefix %>/<%= file.path %>"><%= h file.base_name %></a></li>
121
+ <% end %>
122
+ </ul>
123
+ </div>
124
+ <% end %>
125
+
126
+ <div id="classindex-section" class="section project-section">
127
+ <h3 class="section-header">Class Index
128
+ <span class="search-toggle"><img src="<%= rel_prefix %>/images/find.png"
129
+ height="16" width="16" alt="[+]"
130
+ title="show/hide quicksearch" /></span></h3>
131
+ <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
132
+ <fieldset>
133
+ <legend>Quicksearch</legend>
134
+ <input type="text" name="quicksearch" value=""
135
+ class="quicksearch-field" />
136
+ </fieldset>
137
+ </form>
138
+
139
+ <ul class="link-list">
140
+ <% @modsort.each do |index_klass| %>
141
+ <li><a href="<%= rel_prefix %>/<%= index_klass.path %>"><%= index_klass.full_name %></a></li>
142
+ <% end %>
143
+ </ul>
144
+ <div id="no-class-search-results" style="display: none;">No matching classes.</div>
145
+ </div>
146
+
147
+ <% if $DEBUG_RDOC %>
148
+ <div id="debugging-toggle"><img src="<%= rel_prefix %>/images/bug.png"
149
+ alt="toggle debugging" height="16" width="16" /></div>
150
+ <% end %>
151
+ </div>
152
+ </div>
153
+
154
+ <div id="documentation">
155
+ <h1 class="<%= klass.type %>"><%= klass.full_name %></h1>
156
+
157
+ <div id="description">
158
+ <%= klass.description %>
159
+ </div>
160
+
161
+ <!-- Constants -->
162
+ <% unless klass.constants.empty? %>
163
+ <div id="constants-list" class="section">
164
+ <h3 class="section-header">Constants</h3>
165
+ <dl>
166
+ <% klass.each_constant do |const| %>
167
+ <dt><a name="<%= const.name %>"><%= const.name %></a></dt>
168
+ <% if const.comment %>
169
+ <dd class="description"><%= const.description.strip %></dd>
170
+ <% else %>
171
+ <dd class="description missing-docs">(Not documented)</dd>
172
+ <% end %>
173
+ <% end %>
174
+ </dl>
175
+ </div>
176
+ <% end %>
177
+
178
+ <!-- Attributes -->
179
+ <% unless klass.attributes.empty? %>
180
+ <div id="attribute-method-details" class="method-section section">
181
+ <h3 class="section-header">Attributes</h3>
182
+
183
+ <% klass.each_attribute do |attrib| %>
184
+ <div id="<%= attrib.html_name %>-attribute-method" class="method-detail">
185
+ <a name="<%= h attrib.name %>"></a>
186
+ <% if attrib.rw =~ /w/i %>
187
+ <a name="<%= h attrib.name %>="></a>
188
+ <% end %>
189
+ <div class="method-heading attribute-method-heading">
190
+ <span class="method-name"><%= h attrib.name %></span><span
191
+ class="attribute-access-type">[<%= attrib.rw %>]</span>
192
+ </div>
193
+
194
+ <div class="method-description">
195
+ <% if attrib.comment %>
196
+ <%= attrib.description.strip %>
197
+ <% else %>
198
+ <p class="missing-docs">(Not documented)</p>
199
+ <% end %>
200
+ </div>
201
+ </div>
202
+ <% end %>
203
+ </div>
204
+ <% end %>
205
+
206
+ <!-- Methods -->
207
+ <% klass.methods_by_type.each do |type, visibilities|
208
+ next if visibilities.empty?
209
+ visibilities.each do |visibility, methods|
210
+ next if methods.empty? %>
211
+ <div id="<%= visibility %>-<%= type %>-method-details" class="method-section section">
212
+ <h3 class="section-header"><%= visibility.to_s.capitalize %> <%= type.capitalize %> Methods</h3>
213
+
214
+ <% methods.each do |method| %>
215
+ <div id="<%= method.html_name %>-method" class="method-detail <%= method.is_alias_for ? "method-alias" : '' %>">
216
+ <a name="<%= h method.aref %>"></a>
217
+
218
+ <div class="method-heading">
219
+ <% if method.call_seq %>
220
+ <span class="method-callseq"><%= method.call_seq.strip.gsub(/->/, '&rarr;').gsub( /^\w.*?\./m, '') %></span>
221
+ <span class="method-click-advice">click to toggle source</span>
222
+ <% else %>
223
+ <span class="method-name"><%= h method.name %></span><span
224
+ class="method-args"><%= method.params %></span>
225
+ <span class="method-click-advice">click to toggle source</span>
226
+ <% end %>
227
+ </div>
228
+
229
+ <div class="method-description">
230
+ <% if method.comment %>
231
+ <%= method.description.strip %>
232
+ <% else %>
233
+ <p class="missing-docs">(Not documented)</p>
234
+ <% end %>
235
+
236
+ <% if method.token_stream %>
237
+ <div class="method-source-code"
238
+ id="<%= method.html_name %>-source">
239
+ <pre>
240
+ <%= method.markup_code %>
241
+ </pre>
242
+ </div>
243
+ <% end %>
244
+ </div>
245
+
246
+ <% unless method.aliases.empty? %>
247
+ <div class="aliases">
248
+ Also aliased as: <%= method.aliases.map do |aka|
249
+ %{<a href="#{ klass.aref_to aka.path}">#{h aka.name}</a>}
250
+ end.join(", ") %>
251
+ </div>
252
+ <% end %>
253
+ </div>
254
+
255
+ <% end %>
256
+ </div>
257
+ <% end
258
+ end %>
259
+
260
+ </div>
261
+
262
+
263
+ <div id="rdoc-debugging-section-dump" class="debugging-section">
264
+ <% if $DEBUG_RDOC
265
+ require 'pp' %>
266
+ <pre><%= h PP.pp(klass, _erbout) %></pre>
267
+ </div>
268
+ <% else %>
269
+ <p>Disabled; run with --debug to generate this.</p>
270
+ <% end %>
271
+ </div>
272
+
273
+ <div id="validator-badges">
274
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
275
+ <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
276
+ Rdoc Generator</a> <%= RDoc::Generator::Darkfish::VERSION %></small>.</p>
277
+ </div>
278
+
279
+ </body>
280
+ </html>
281
+
@@ -0,0 +1,112 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
+
5
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
6
+ <head>
7
+ <meta content="text/html; charset=<%= @options.charset %>" http-equiv="Content-Type" />
8
+
9
+ <title>File: <%= file.base_name %> [<%= @options.title %>]</title>
10
+
11
+ <link type="text/css" media="screen" href="<%= rel_prefix %>/rdoc.css" rel="stylesheet" />
12
+
13
+ <script src="<%= rel_prefix %>/js/jquery.js" type="text/javascript"
14
+ charset="utf-8"></script>
15
+ <script src="<%= rel_prefix %>/js/thickbox-compressed.js" type="text/javascript"
16
+ charset="utf-8"></script>
17
+ <script src="<%= rel_prefix %>/js/quicksearch.js" type="text/javascript"
18
+ charset="utf-8"></script>
19
+ <script src="<%= rel_prefix %>/js/darkfish.js" type="text/javascript"
20
+ charset="utf-8"></script>
21
+ </head>
22
+
23
+ <% if file.parser == RDoc::Parser::Simple %>
24
+ <body class="file">
25
+ <div id="metadata">
26
+ <div id="project-metadata">
27
+ <% simple_files = @files.select { |f| f.parser == RDoc::Parser::Simple } %>
28
+ <% unless simple_files.empty? then %>
29
+ <div id="fileindex-section" class="section project-section">
30
+ <h3 class="section-header">Files</h3>
31
+ <ul>
32
+ <% simple_files.each do |f| %>
33
+ <li class="file"><a href="<%= rel_prefix %>/<%= f.path %>"><%= h f.base_name %></a></li>
34
+ <% end %>
35
+ </ul>
36
+ </div>
37
+ <% end %>
38
+
39
+ <div id="classindex-section" class="section project-section">
40
+ <h3 class="section-header">Class Index
41
+ <span class="search-toggle"><img src="<%= rel_prefix %>/images/find.png"
42
+ height="16" width="16" alt="[+]"
43
+ title="show/hide quicksearch" /></span></h3>
44
+ <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
45
+ <fieldset>
46
+ <legend>Quicksearch</legend>
47
+ <input type="text" name="quicksearch" value=""
48
+ class="quicksearch-field" />
49
+ </fieldset>
50
+ </form>
51
+
52
+ <ul class="link-list">
53
+ <% @modsort.each do |index_klass| %>
54
+ <li><a href="<%= rel_prefix %>/<%= index_klass.path %>"><%= index_klass.full_name %></a></li>
55
+ <% end %>
56
+ </ul>
57
+ <div id="no-class-search-results" style="display: none;">No matching classes.</div>
58
+ </div>
59
+
60
+ <% if $DEBUG_RDOC %>
61
+ <div id="debugging-toggle"><img src="<%= rel_prefix %>/images/bug.png"
62
+ alt="toggle debugging" height="16" width="16" /></div>
63
+ <% end %>
64
+ </div>
65
+ </div>
66
+
67
+ <div id="documentation">
68
+ <%= file.description %>
69
+ </div>
70
+
71
+ <div id="validator-badges">
72
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
73
+ <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
74
+ Rdoc Generator</a> <%= RDoc::Generator::Darkfish::VERSION %></small>.</p>
75
+ </div>
76
+ </body>
77
+ <% else %>
78
+ <body class="file file-popup">
79
+ <div id="metadata">
80
+ <dl>
81
+ <dt class="modified-date">Last Modified</dt>
82
+ <dd class="modified-date"><%= file.last_modified %></dd>
83
+
84
+ <% if file.requires %>
85
+ <dt class="requires">Requires</dt>
86
+ <dd class="requires">
87
+ <ul>
88
+ <% file.requires.each do |require| %>
89
+ <li><%= require.name %></li>
90
+ <% end %>
91
+ </ul>
92
+ </dd>
93
+ <% end %>
94
+
95
+ <% if @options.webcvs %>
96
+ <dt class="scs-url">Trac URL</dt>
97
+ <dd class="scs-url"><a target="_top"
98
+ href="<%= file.cvs_url %>"><%= file.cvs_url %></a></dd>
99
+ <% end %>
100
+ </dl>
101
+
102
+ <% if file.comment %>
103
+ <div class="description">
104
+ <h2>Description</h2>
105
+ <%= file.description %>
106
+ </div>
107
+ <% end %>
108
+ </div>
109
+ </body>
110
+ <% end %>
111
+ </html>
112
+