@@ -18,20 +18,41 @@ ac.puts <<-eof
1818 <body>
1919 <h3>All Classes</h3>
2020eof
21+ am = File . open ( "doc/all-modules.html" , "w" )
22+ am . puts <<-eof
23+ <html>
24+ <head>
25+ <base target="main" />
26+ </head>
27+ <body>
28+ <h3>All Modules</h3>
29+ eof
2130meths = [ ]
2231Namespace . all . sort . each do |path |
2332 object = Namespace . at ( path )
24- if object . is_a? ( MethodObject ) && object . visibility == :public
33+ if object . is_a? ( MethodObject ) && ( object . visibility == :protected || object . visibility == : public)
2534 meths << [ object . name , object ]
2635 end
2736
28- next unless object . is_a? ClassObject
29- ac . puts "<a href='" + path . gsub ( "::" , "_" ) + ".html'>" + path + "</a><br />"
37+ indexfile = nil
38+
39+ case object
40+ when ClassObject
41+ indexfile = ac
42+ when ModuleObject
43+ indexfile = am
44+ else
45+ next
46+ end
47+
48+ indexfile . puts "<a href='" + path . gsub ( "::" , "_" ) + ".html'>" + path + "</a><br />"
3049 puts "Generating " + ( docfile = "doc/#{ path . gsub ( '::' , '_' ) } .html" ) + "..."
3150 File . open ( docfile , "w" ) { |f | f . write ( object . to_s ) }
3251end
3352ac . puts "</body></html>"
3453ac . close
54+ am . puts "</body></html>"
55+ am . close
3556
3657File . open ( "doc/all-methods.html" , "w" ) do |f |
3758 f . puts <<-eof
@@ -41,7 +62,7 @@ File.open("doc/all-methods.html", "w") do |f|
4162 </head>
4263 <body>
4364 <h3>All Methods</h3>
44- eof
65+ eof
4566 meths . sort { |a , b | a . first <=> b . first } . each do |name , object |
4667 f . puts "<a href='" + object . parent . path . gsub ( "::" , "_" ) + ".html##{ object . scope } _method-#{ name } '>#{ name } </a><br />"
4768 end
@@ -63,8 +84,9 @@ File.open("doc/index.html", "w") do |f|
6384 <title>Ruby Classes</title>
6485 </head>
6586 <frameset cols="250,*">
66- <frameset rows="* ,40%">
87+ <frameset rows="40% ,40%,20 %">
6788 <frame src="all-classes.html">
89+ <frame src="all-modules.html">
6890 <frame src="all-methods.html">
6991 </frameset>
7092 <frame name="main" src="#{ main_page } ">
0 commit comments