Skip to content

Commit 2b8a715

Browse files
author
loren
committed
Tag 0.2.1
git-svn-id: http://soen.ca/svn/projects/ruby/yard/tags/0.2.1@801 a99b2113-df67-db11-8bcc-000c76553aea
1 parent aac637c commit 2b8a715

71 files changed

Lines changed: 183 additions & 14393 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

bin/yardoc

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,41 @@ ac.puts <<-eof
1818
<body>
1919
<h3>All Classes</h3>
2020
eof
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
2130
meths = []
2231
Namespace.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) }
3251
end
3352
ac.puts "</body></html>"
3453
ac.close
54+
am.puts "</body></html>"
55+
am.close
3556

3657
File.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

Comments
 (0)