rdoc_chm 2.3.0 → 2.4.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.
Files changed (44) hide show
  1. data/History.txt +24 -0
  2. data/Manifest.txt +41 -7
  3. data/README.rdoc +40 -0
  4. data/Rakefile +43 -22
  5. data/lib/rdoc/generator/chm.rb +71 -65
  6. data/lib/rdoc/generator/template/chm/.document +0 -0
  7. data/lib/rdoc/generator/template/chm/chm_index.rhtml +27 -0
  8. data/lib/rdoc/generator/template/chm/classindex.rhtml +28 -0
  9. data/lib/rdoc/generator/template/chm/classpage.rhtml +204 -0
  10. data/lib/rdoc/generator/template/chm/contents.rhtml +53 -0
  11. data/lib/rdoc/generator/template/chm/fileindex.rhtml +31 -0
  12. data/lib/rdoc/generator/template/chm/filepage.rhtml +74 -0
  13. data/lib/rdoc/generator/template/chm/hpp_file.rhtml +18 -0
  14. data/lib/rdoc/generator/template/chm/images/brick.png +0 -0
  15. data/lib/rdoc/generator/template/chm/images/brick_link.png +0 -0
  16. data/lib/rdoc/generator/template/chm/images/bug.png +0 -0
  17. data/lib/rdoc/generator/template/chm/images/bullet_black.png +0 -0
  18. data/lib/rdoc/generator/template/chm/images/bullet_toggle_minus.png +0 -0
  19. data/lib/rdoc/generator/template/chm/images/bullet_toggle_plus.png +0 -0
  20. data/lib/rdoc/generator/template/chm/images/date.png +0 -0
  21. data/lib/rdoc/generator/template/chm/images/find.png +0 -0
  22. data/lib/rdoc/generator/template/chm/images/loadingAnimation.gif +0 -0
  23. data/lib/rdoc/generator/template/chm/images/macFFBgHack.png +0 -0
  24. data/lib/rdoc/generator/template/chm/images/package.png +0 -0
  25. data/lib/rdoc/generator/template/chm/images/page_green.png +0 -0
  26. data/lib/rdoc/generator/template/chm/images/page_white_text.png +0 -0
  27. data/lib/rdoc/generator/template/chm/images/page_white_width.png +0 -0
  28. data/lib/rdoc/generator/template/chm/images/plugin.png +0 -0
  29. data/lib/rdoc/generator/template/chm/images/ruby.png +0 -0
  30. data/lib/rdoc/generator/template/chm/images/tag_green.png +0 -0
  31. data/lib/rdoc/generator/template/chm/images/wrench.png +0 -0
  32. data/lib/rdoc/generator/template/chm/images/wrench_orange.png +0 -0
  33. data/lib/rdoc/generator/template/chm/images/zoom.png +0 -0
  34. data/lib/rdoc/generator/template/chm/index.rhtml +89 -0
  35. data/lib/rdoc/generator/template/chm/js/darkfish.js +116 -0
  36. data/lib/rdoc/generator/template/chm/js/jquery.js +32 -0
  37. data/lib/rdoc/generator/template/chm/js/quicksearch.js +114 -0
  38. data/lib/rdoc/generator/template/chm/js/thickbox-compressed.js +10 -0
  39. data/lib/rdoc/generator/template/chm/rdoc.css +698 -0
  40. metadata +51 -36
  41. data.tar.gz.sig +0 -0
  42. data/README.txt +0 -35
  43. data/lib/rdoc/generator/chm/chm.rb +0 -100
  44. metadata.gz.sig +0 -0
@@ -1,3 +1,27 @@
1
+ === 2.4.0 / 2009-08-10
2
+
3
+ * Two major enhancementsd
4
+ * RDoc 2.4.x compatibility
5
+ - Converted to RHTML templates
6
+ - --opname option was removed form RDoc. RDoc_chm now uses --op for naming the CHM file
7
+ * Improved table of contents and index.
8
+ - TOC is now split into classes/modules and files
9
+ - index now lists methods followed by their class, i.e. 'to_s (Symbol)'
10
+
11
+ * Multiple minor enhancements:
12
+ * fixed issue when klass.superclass is nil
13
+ * moved file metadata into documentation div for single column layout
14
+ * moved class metadata into documentation div for single column layout
15
+ * removed method list from index page. takes a long time to load on ruby-core and stdlib.
16
+ (plus the data is given in the CHM TOC and index).
17
+ * added classindex and fileindex pages
18
+ * Readme fixes
19
+ * udpated TOC from "Classes" to "Classes/Modules"
20
+ * TOC uses method.pretty_name instead of method.name
21
+ * added hidden img tags to index.rhtml so the html help compiler will find image files
22
+ * fixes to chm project and contents files
23
+ * Readme corrections
24
+
1
25
  === 2.3.0 / 2008-12-29
2
26
 
3
27
  * 1 major enhancement
@@ -1,7 +1,41 @@
1
- History.txt
2
- Manifest.txt
3
- README.txt
4
- Rakefile
5
- lib/rdoc/discover.rb
6
- lib/rdoc/generator/chm.rb
7
- lib/rdoc/generator/chm/chm.rb
1
+ History.txt
2
+ Manifest.txt
3
+ README.rdoc
4
+ Rakefile
5
+ lib/rdoc/discover.rb
6
+ lib/rdoc/generator/chm.rb
7
+ lib/rdoc/generator/template/chm/.document
8
+ lib/rdoc/generator/template/chm/chm_index.rhtml
9
+ lib/rdoc/generator/template/chm/classindex.rhtml
10
+ lib/rdoc/generator/template/chm/classpage.rhtml
11
+ lib/rdoc/generator/template/chm/contents.rhtml
12
+ lib/rdoc/generator/template/chm/fileindex.rhtml
13
+ lib/rdoc/generator/template/chm/filepage.rhtml
14
+ lib/rdoc/generator/template/chm/hpp_file.rhtml
15
+ lib/rdoc/generator/template/chm/images/brick.png
16
+ lib/rdoc/generator/template/chm/images/brick_link.png
17
+ lib/rdoc/generator/template/chm/images/bug.png
18
+ lib/rdoc/generator/template/chm/images/bullet_black.png
19
+ lib/rdoc/generator/template/chm/images/bullet_toggle_minus.png
20
+ lib/rdoc/generator/template/chm/images/bullet_toggle_plus.png
21
+ lib/rdoc/generator/template/chm/images/date.png
22
+ lib/rdoc/generator/template/chm/images/find.png
23
+ lib/rdoc/generator/template/chm/images/loadingAnimation.gif
24
+ lib/rdoc/generator/template/chm/images/macFFBgHack.png
25
+ lib/rdoc/generator/template/chm/images/package.png
26
+ lib/rdoc/generator/template/chm/images/page_green.png
27
+ lib/rdoc/generator/template/chm/images/page_white_text.png
28
+ lib/rdoc/generator/template/chm/images/page_white_width.png
29
+ lib/rdoc/generator/template/chm/images/plugin.png
30
+ lib/rdoc/generator/template/chm/images/ruby.png
31
+ lib/rdoc/generator/template/chm/images/tag_green.png
32
+ lib/rdoc/generator/template/chm/images/wrench.png
33
+ lib/rdoc/generator/template/chm/images/wrench_orange.png
34
+ lib/rdoc/generator/template/chm/images/zoom.png
35
+ lib/rdoc/generator/template/chm/index.rhtml
36
+ lib/rdoc/generator/template/chm/js/darkfish.js
37
+ lib/rdoc/generator/template/chm/js/jquery.js
38
+ lib/rdoc/generator/template/chm/js/quicksearch.js
39
+ lib/rdoc/generator/template/chm/js/thickbox-compressed.js
40
+ lib/rdoc/generator/template/chm/rdoc.css
41
+
@@ -0,0 +1,40 @@
1
+ = \RDoc_CHM
2
+
3
+ * {RDoc_CHM Project Page}[http://github.com/vertiginous/rdoc_chm]
4
+ * {RDoc_CHM Bug Tracker}[http://github.com/vertiginous/rdoc_chm/issues]
5
+
6
+ == DESCRIPTION:
7
+
8
+ A Microsoft Compiled HTML Help generator for {RDoc}[http://rdoc.rubyforge.org/].
9
+
10
+ == FEATURES/PROBLEMS:
11
+
12
+
13
+ == SYNOPSIS:
14
+
15
+ gem 'rdoc'
16
+ require 'rdoc/rdoc'
17
+
18
+ RDoc::RDoc.new.document "-f chm", # ... see RDoc
19
+
20
+ Or at the command line:
21
+
22
+ rdoc --fmt chm
23
+
24
+ == REQUIREMENTS:
25
+
26
+ * A Windows OS
27
+ * RDoc 2.4
28
+ * Requires installation of Microsoft's HTML Help Workshop
29
+ You can download a copy for free from:
30
+ http://msdn.microsoft.com/library/default.asp?url=/library/en-us/htmlhelp/html/hwMicrosoftHTMLHelpDownloads.asp
31
+ == INSTALL:
32
+
33
+ * gem install rdoc_chm
34
+
35
+ == LICENSE:
36
+
37
+ RDoc is Copyright (c) 2001-2003 Dave Thomas, The Pragmatic Programmers. It is
38
+ free software, and may be redistributed under the terms specified in the
39
+ README file of the Ruby distribution.
40
+
data/Rakefile CHANGED
@@ -1,22 +1,43 @@
1
- # -*- ruby -*-
2
-
3
- require 'rubygems'
4
- require 'hoe'
5
-
6
- $:.unshift 'lib'
7
- require 'rdoc/rdoc'
8
- require 'rdoc/generator/chm'
9
-
10
- Hoe.new 'rdoc_chm', RDoc::Generator::CHM::VERSION do |p|
11
- p.rubyforge_name = 'rdoc'
12
-
13
- p.developer 'Eric Hodel', 'drbrain@segment7.net'
14
- p.developer 'Dave Thomas', ''
15
- p.developer 'Tony Strauss', 'tony.strauss@designingpatterns.com'
16
-
17
- p.extra_deps << ['rdoc', '~> 2.3']
18
- p.extra_dev_deps << ['minitest', '~> 1.3']
19
- p.spec_extras['required_rubygems_version'] = '>= 1.3'
20
- end
21
-
22
- # vim: syntax=Ruby
1
+ # -*- ruby -*-
2
+
3
+ require 'rubygems'
4
+ require 'hoe'
5
+
6
+ $:.unshift 'lib'
7
+
8
+ require 'rdoc/generator/chm'
9
+
10
+ Hoe.plugin :git
11
+
12
+ Hoe.spec 'rdoc_chm' do |rdoc_chm|
13
+ rdoc_chm.rubyforge_name = 'rdoc'
14
+
15
+ rdoc_chm.developer 'Gordon Thiesfeld', 'gthiesfeld@gmail.com'
16
+ rdoc_chm.developer 'Eric Hodel', 'drbrain@segment7.net'
17
+ rdoc_chm.developer 'Dave Thomas', ''
18
+ rdoc_chm.developer 'Tony Strauss', 'tony.strauss@designingpatterns.com'
19
+
20
+ rdoc_chm.readme_file = 'README.rdoc'
21
+
22
+ rdoc_chm.extra_deps << ['rdoc', '>= 2.4']
23
+
24
+ rdoc_chm.testlib = :minitest
25
+
26
+ rdoc_chm.extra_dev_deps << ['minitest', '~> 1.3']
27
+ rdoc_chm.spec_extras['required_rubygems_version'] = '>= 1.3'
28
+ rdoc_chm.spec_extras['homepage'] = 'http://rdoc.rubyforge.org/rdoc_chm'
29
+ end
30
+
31
+ desc "Build chm files"
32
+ task :chm => :clean do
33
+ sh %q{ rdoc --fmt chm --op rdoc_chm --title="rdoc_chm 2.4.0" --main=README.rdoc . }
34
+ end
35
+
36
+ task :clobber_chm do
37
+ rm_rf "rdoc_chm"
38
+ end
39
+
40
+ desc "rebuild chm files"
41
+ task :rechm => [:clobber_chm, :chm]
42
+
43
+ # vim: syntax=Ruby
@@ -1,24 +1,29 @@
1
- gem 'rdoc', '~> 2.3'
2
- require 'rdoc/generator/html'
1
+ gem 'rdoc', '>= 2.4'
2
+ require 'rdoc/generator/darkfish'
3
3
 
4
- class RDoc::Generator::CHM < RDoc::Generator::HTML
4
+ class RDoc::AnyMethod
5
+
6
+ ##
7
+ # Full method name for the CHM's index.
8
+ # in the format:
9
+ # method (Class)
5
10
 
6
- VERSION = '2.3.0'
11
+ def chm_index_name
12
+ "#{name} (#{@parent.full_name})"
13
+ end
7
14
 
8
- RDoc::RDoc.add_generator self
15
+ end
9
16
 
10
- HHC_PATH = "c:/Program Files/HTML Help Workshop/hhc.exe"
17
+ class RDoc::Generator::CHM < RDoc::Generator::Darkfish
11
18
 
12
- ##
13
- # Standard generator factory
19
+ VERSION = '2.4.0'
14
20
 
15
- def self.for(options)
16
- new(options)
17
- end
21
+ RDoc::RDoc.add_generator( self )
22
+
23
+ HHC_PATH = "c:/Program Files/HTML Help Workshop/hhc.exe"
18
24
 
19
- def initialize(*args)
25
+ def initialize(options)
20
26
  super
21
- @op_name = @options.op_name || "rdoc"
22
27
  check_for_html_help_workshop
23
28
  end
24
29
 
@@ -37,80 +42,81 @@ class RDoc::Generator::CHM < RDoc::Generator::HTML
37
42
  ##
38
43
  # Generate the html as normal, then wrap it in a help project
39
44
 
40
- def generate(info)
45
+ def generate( top_levels )
41
46
  super
42
- @project_name = @op_name + ".hhp"
43
- create_help_project
47
+ @project_name = "#{@outputdir.basename}.hhp"
48
+ generate_help_project
44
49
  end
45
50
 
46
51
  ##
47
52
  # The project contains the project file, a table of contents and an index
48
53
 
49
- def create_help_project
50
- create_project_file
51
- create_contents_and_index
54
+ def generate_help_project
55
+ debug_msg "Generating the help project files"
56
+ generate_file_index
57
+ generate_class_index
58
+ generate_project_file
59
+ generate_contents
60
+ generate_chm_index
52
61
  compile_project
53
62
  end
54
63
 
64
+ def generate_file_index
65
+ templatefile = @template_dir + 'fileindex.rhtml'
66
+
67
+ outfile = @outputdir + "fileindex.html"
68
+ debug_msg " rendering #{outfile}"
69
+ self.render_template( templatefile, binding(), outfile )
70
+ end
71
+
72
+ def generate_class_index
73
+ templatefile = @template_dir + 'classindex.rhtml'
74
+
75
+ outfile = @outputdir + "classindex.html"
76
+ debug_msg " rendering #{outfile}"
77
+ self.render_template( templatefile, binding(), outfile )
78
+ end
79
+
55
80
  ##
56
81
  # The project file links together all the various
57
82
  # files that go to make up the help.
83
+ def generate_project_file
84
+ templatefile = @template_dir + 'hpp_file.rhtml'
85
+
86
+ @values = { :title => @options.title, :opname => @outputdir.basename }
87
+
88
+ static_files = ['index.html', 'classindex.html', 'fileindex.html']
89
+ @values[:html_files] = static_files + (@files+@classes).map{|f| f.path }
90
+
91
+ outfile = @outputdir + @project_name
92
+ debug_msg " rendering #{outfile}"
93
+ self.render_template( templatefile, binding(), outfile )
94
+ end
58
95
 
59
- def create_project_file
60
- template = RDoc::TemplatePage.new @template::HPP_FILE
61
- values = { "title" => @options.title, "opname" => @op_name }
62
- files = []
63
- @files.each do |f|
64
- files << { "html_file_name" => f.path }
65
- end
66
-
67
- values['all_html_files'] = files
96
+ ##
97
+ # generate the CHM contents (contents.hhc)
98
+ def generate_contents
99
+ templatefile = @template_dir + 'contents.rhtml'
68
100
 
69
- File.open(@project_name, "w") do |f|
70
- template.write_html_on(f, values)
71
- end
101
+ outfile = @outputdir + "contents.hhc"
102
+ debug_msg " rendering #{outfile}"
103
+ self.render_template( templatefile, binding(), outfile )
72
104
  end
73
105
 
74
106
  ##
75
- # The contents is a list of all files and modules.
76
- # For each we include as sub-entries the list
77
- # of methods they contain. As we build the contents
78
- # we also build an index file
79
-
80
- def create_contents_and_index
81
- contents = []
82
- index = []
83
-
84
- (@files+@classes).sort.each do |entry|
85
- content_entry = { "c_name" => entry.name, "ref" => entry.path }
86
- index << { "name" => entry.name, "aref" => entry.path }
87
-
88
- internals = []
89
-
90
- methods = entry.build_method_summary_list(entry.path)
91
-
92
- content_entry["methods"] = methods unless methods.empty?
93
- contents << content_entry
94
- index.concat methods
95
- end
96
-
97
- values = { "contents" => contents }
98
- template = RDoc::TemplatePage.new @template::CONTENTS
99
- File.open("contents.hhc", "w") do |f|
100
- template.write_html_on(f, values)
101
- end
102
-
103
- values = { "index" => index }
104
- template = RDoc::TemplatePage.new @template::CHM_INDEX
105
- File.open("index.hhk", "w") do |f|
106
- template.write_html_on(f, values)
107
- end
107
+ # generate the CHM index (index.hhk)
108
+ def generate_chm_index
109
+ templatefile = @template_dir + 'chm_index.rhtml'
110
+
111
+ outfile = @outputdir + "index.hhk"
112
+ debug_msg " rendering #{outfile}"
113
+ self.render_template( templatefile, binding(), outfile )
108
114
  end
109
115
 
110
116
  ##
111
117
  # Invoke the windows help compiler to compiler the project
112
-
113
118
  def compile_project
119
+ debug_msg " compiling #{@project_name}"
114
120
  system(HHC_PATH, @project_name)
115
121
  end
116
122
 
@@ -0,0 +1,27 @@
1
+ !DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2
+ <HTML>
3
+ <HEAD>
4
+ <meta name="GENERATOR" content="Microsoft&reg; HTML Help Workshop 4.1">
5
+ <!-- Sitemap 1.0 -->
6
+ </HEAD><BODY>
7
+ <OBJECT type="text/site properties">
8
+ <param name="Foreground" value="0x80">
9
+ <param name="Window Styles" value="0x800025">
10
+ <param name="ImageType" value="Folder">
11
+ </OBJECT>
12
+ <UL>
13
+ <% (@files+@classes).sort.each do |index| %>
14
+ <LI> <OBJECT type="text/sitemap">
15
+ <param name="Name" value="<%= index.full_name %>">
16
+ <param name="Local" value="<%= index.path %>">
17
+ </OBJECT>
18
+
19
+ <% index.method_list.sort.each do |method| %>
20
+ <LI> <OBJECT type="text/sitemap">
21
+ <param name="Name" value="<%= method.chm_index_name %>">
22
+ <param name="Local" value="<%= method.path %>">
23
+ </OBJECT>
24
+ <% end # index.method_list.sort %>
25
+ <% end # (@files+@classes).sort %>
26
+ </UL>
27
+ </BODY></HTML>
@@ -0,0 +1,28 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
2
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3
+
4
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
5
+ <head>
6
+ <meta content="text/html; charset=<%= @options.charset %>" http-equiv="Content-Type" />
7
+
8
+ <title>Classes/Modules</title>
9
+
10
+ <link type="text/css" media="screen" href="rdoc.css" rel="stylesheet" />
11
+
12
+ </head>
13
+ <body class="indexpage">
14
+
15
+ <% $stderr.sync = true %>
16
+ <h1><%= h @options.title %></h1>
17
+
18
+ <p>This is the API documentation for '<%= @options.title %>'.</p>
19
+
20
+ <h2>Classes/Modules</h2>
21
+ <ul>
22
+ <% @modsort.each do |klass| %>
23
+ <li class="<%= klass.type %>"><a href="<%= klass.path %>"><%= klass.full_name %></a></li>
24
+ <% end %>
25
+ </ul>
26
+
27
+ </body>
28
+ </html>
@@ -0,0 +1,204 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta content="text/html; charset=<%= @options.charset %>" http-equiv="Content-Type" />
6
+
7
+ <title><%= klass.type.capitalize %>: <%= klass.full_name %></title>
8
+
9
+ <link rel="stylesheet" href="<%= rel_prefix %>/rdoc.css" type="text/css" media="screen" />
10
+
11
+ <script src="<%= rel_prefix %>/js/jquery.js" type="text/javascript"
12
+ charset="utf-8"></script>
13
+ <script src="<%= rel_prefix %>/js/thickbox-compressed.js" type="text/javascript"
14
+ charset="utf-8"></script>
15
+ <script src="<%= rel_prefix %>/js/quicksearch.js" type="text/javascript"
16
+ charset="utf-8"></script>
17
+ <script src="<%= rel_prefix %>/js/darkfish.js" type="text/javascript"
18
+ charset="utf-8"></script>
19
+
20
+ </head>
21
+ <body class="<%= klass.type %>">
22
+
23
+ <div id="documentation">
24
+
25
+ <h1 class="<%= klass.type %>"><%= klass.full_name %></h1>
26
+
27
+
28
+ <!--<div id="metadata"> -->
29
+ <div id="file-metadata">
30
+ <div id="file-list-section" class="section">
31
+ <h3 class="section-header">In Files</h3>
32
+ <div class="section-body">
33
+ <ul>
34
+ <% klass.in_files.each do |tl| %>
35
+ <li><a href="<%= rel_prefix %>/<%= h tl.path %>"
36
+ title="<%= h tl.absolute_name %>"><%= h tl.absolute_name %></a></li>
37
+ <% end %>
38
+ </ul>
39
+ </div>
40
+ </div>
41
+
42
+ <div id="class-metadata">
43
+
44
+ <!-- Parent Class -->
45
+ <% if klass.type == 'class' %>
46
+ <div id="parent-class-section" class="section">
47
+ <h3 class="section-header">Parent</h3>
48
+ <% unless String === klass.superclass or klass.superclass.nil? %>
49
+ <p class="link"><a href="<%= klass.aref_to klass.superclass.path %>"><%= klass.superclass.full_name %></a></p>
50
+ <% else %>
51
+ <p class="link"><%= klass.superclass %></p>
52
+ <% end %>
53
+ </div>
54
+ <% end %>
55
+
56
+ <!-- Included Modules -->
57
+ <% unless klass.includes.empty? %>
58
+ <div id="includes-section" class="section">
59
+ <h3 class="section-header">Included Modules</h3>
60
+ <ul class="link-list">
61
+ <% klass.each_include do |inc| %>
62
+ <% unless String === inc.module %>
63
+ <li><a class="include" href="<%= klass.aref_to inc.module.path %>"><%= inc.module.full_name %></a></li>
64
+ <% else %>
65
+ <li><span class="include"><%= inc.name %></span></li>
66
+ <% end %>
67
+ <% end %>
68
+ </ul>
69
+ </div>
70
+ <% end %>
71
+ </div>
72
+
73
+ <% if $DEBUG_RDOC %>
74
+ <div id="debugging-toggle"><img src="<%= rel_prefix %>/images/bug.png"
75
+ alt="toggle debugging" height="16" width="16" /></div>
76
+ <% end %>
77
+ </div>
78
+ <!-- </div> -->
79
+
80
+ <div id="description">
81
+ <%= klass.description %>
82
+ </div>
83
+
84
+ <!-- Constants -->
85
+ <% unless klass.constants.empty? %>
86
+ <div id="constants-list" class="section">
87
+ <h3 class="section-header">Constants</h3>
88
+ <dl>
89
+ <% klass.each_constant do |const| %>
90
+ <dt><a name="<%= const.name %>"><%= const.name %></a></dt>
91
+ <% if const.comment %>
92
+ <dd class="description"><%= const.description.strip %></dd>
93
+ <% else %>
94
+ <dd class="description missing-docs">(Not documented)</dd>
95
+ <% end %>
96
+ <% end %>
97
+ </dl>
98
+ </div>
99
+ <% end %>
100
+
101
+ <!-- Attributes -->
102
+ <% unless klass.attributes.empty? %>
103
+ <div id="attribute-method-details" class="method-section section">
104
+ <h3 class="section-header">Attributes</h3>
105
+
106
+ <% klass.each_attribute do |attrib| %>
107
+ <div id="<%= attrib.html_name %>-attribute-method" class="method-detail">
108
+ <a name="<%= h attrib.name %>"></a>
109
+ <% if attrib.rw =~ /w/i %>
110
+ <a name="<%= h attrib.name %>="></a>
111
+ <% end %>
112
+ <div class="method-heading attribute-method-heading">
113
+ <span class="method-name"><%= h attrib.name %></span><span
114
+ class="attribute-access-type">[<%= attrib.rw %>]</span>
115
+ </div>
116
+
117
+ <div class="method-description">
118
+ <% if attrib.comment %>
119
+ <%= attrib.description.strip %>
120
+ <% else %>
121
+ <p class="missing-docs">(Not documented)</p>
122
+ <% end %>
123
+ </div>
124
+ </div>
125
+ <% end %>
126
+ </div>
127
+ <% end %>
128
+
129
+ <!-- Methods -->
130
+ <% klass.methods_by_type.each do |type, visibilities|
131
+ next if visibilities.empty?
132
+ visibilities.each do |visibility, methods|
133
+ next if methods.empty? %>
134
+ <div id="<%= visibility %>-<%= type %>-method-details" class="method-section section">
135
+ <h3 class="section-header"><%= visibility.to_s.capitalize %> <%= type.capitalize %> Methods</h3>
136
+
137
+ <% methods.each do |method| %>
138
+ <div id="<%= method.html_name %>-method" class="method-detail <%= method.is_alias_for ? "method-alias" : '' %>">
139
+ <a name="<%= h method.aref %>"></a>
140
+
141
+ <div class="method-heading">
142
+ <% if method.call_seq %>
143
+ <span class="method-callseq"><%= method.call_seq.strip.gsub(/->/, '&rarr;').gsub( /^\w.*?\./m, '') %></span>
144
+ <span class="method-click-advice">click to toggle source</span>
145
+ <% else %>
146
+ <span class="method-name"><%= h method.name %></span><span
147
+ class="method-args"><%= method.params %></span>
148
+ <span class="method-click-advice">click to toggle source</span>
149
+ <% end %>
150
+ </div>
151
+
152
+ <div class="method-description">
153
+ <% if method.comment %>
154
+ <%= method.description.strip %>
155
+ <% else %>
156
+ <p class="missing-docs">(Not documented)</p>
157
+ <% end %>
158
+
159
+ <% if method.token_stream %>
160
+ <div class="method-source-code"
161
+ id="<%= method.html_name %>-source">
162
+ <pre>
163
+ <%= method.markup_code %>
164
+ </pre>
165
+ </div>
166
+ <% end %>
167
+ </div>
168
+
169
+ <% unless method.aliases.empty? %>
170
+ <div class="aliases">
171
+ Also aliased as: <%= method.aliases.map do |aka|
172
+ %{<a href="#{ klass.aref_to aka.path}">#{h aka.name}</a>}
173
+ end.join(", ") %>
174
+ </div>
175
+ <% end %>
176
+ </div>
177
+
178
+ <% end %>
179
+ </div>
180
+ <% end
181
+ end %>
182
+
183
+ </div>
184
+
185
+
186
+ <div id="rdoc-debugging-section-dump" class="debugging-section">
187
+ <% if $DEBUG_RDOC
188
+ require 'pp' %>
189
+ <pre><%= h PP.pp(klass, _erbout) %></pre>
190
+ </div>
191
+ <% else %>
192
+ <p>Disabled; run with --debug to generate this.</p>
193
+ <% end %>
194
+ </div>
195
+
196
+ <div id="validator-badges">
197
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
198
+ <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
199
+ Rdoc Generator</a> <%= RDoc::Generator::Darkfish::VERSION %></small>.</p>
200
+ </div>
201
+
202
+ </body>
203
+ </html>
204
+