Skip to content

Commit

Permalink
Tag 0.2.1
Browse files Browse the repository at this point in the history
git-svn-id: http://soen.ca/svn/projects/ruby/yard/tags/0.2.1@801 a99b2113-df67-db11-8bcc-000c76553aea
  • Loading branch information
loren committed Feb 24, 2008
1 parent aac637c commit 2b8a715
Show file tree
Hide file tree
Showing 71 changed files with 183 additions and 14,393 deletions.
32 changes: 27 additions & 5 deletions bin/yardoc
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -18,20 +18,41 @@ ac.puts <<-eof
<body> <body>
<h3>All Classes</h3> <h3>All Classes</h3>
eof eof
am = File.open("doc/all-modules.html", "w")
am.puts <<-eof
<html>
<head>
<base target="main" />
</head>
<body>
<h3>All Modules</h3>
eof
meths = [] meths = []
Namespace.all.sort.each do |path| Namespace.all.sort.each do |path|
object = Namespace.at(path) object = Namespace.at(path)
if object.is_a?(MethodObject) && object.visibility == :public if object.is_a?(MethodObject) && (object.visibility == :protected || object.visibility == :public)
meths << [object.name, object] meths << [object.name, object]
end end


next unless object.is_a? ClassObject indexfile = nil
ac.puts "<a href='" + path.gsub("::","_") + ".html'>" + path + "</a><br />"
case object
when ClassObject
indexfile = ac
when ModuleObject
indexfile = am
else
next
end

indexfile.puts "<a href='" + path.gsub("::","_") + ".html'>" + path + "</a><br />"
puts "Generating " + (docfile = "doc/#{path.gsub('::','_')}.html") + "..." puts "Generating " + (docfile = "doc/#{path.gsub('::','_')}.html") + "..."
File.open(docfile, "w") {|f| f.write(object.to_s) } File.open(docfile, "w") {|f| f.write(object.to_s) }
end end
ac.puts "</body></html>" ac.puts "</body></html>"
ac.close ac.close
am.puts "</body></html>"
am.close


File.open("doc/all-methods.html", "w") do |f| File.open("doc/all-methods.html", "w") do |f|
f.puts <<-eof f.puts <<-eof
Expand All @@ -41,7 +62,7 @@ File.open("doc/all-methods.html", "w") do |f|
</head> </head>
<body> <body>
<h3>All Methods</h3> <h3>All Methods</h3>
eof eof
meths.sort {|a,b| a.first <=> b.first }.each do |name, object| meths.sort {|a,b| a.first <=> b.first }.each do |name, object|
f.puts "<a href='" + object.parent.path.gsub("::", "_") + ".html##{object.scope}_method-#{name}'>#{name}</a><br />" f.puts "<a href='" + object.parent.path.gsub("::", "_") + ".html##{object.scope}_method-#{name}'>#{name}</a><br />"
end end
Expand All @@ -63,8 +84,9 @@ File.open("doc/index.html", "w") do |f|
<title>Ruby Classes</title> <title>Ruby Classes</title>
</head> </head>
<frameset cols="250,*"> <frameset cols="250,*">
<frameset rows="*,40%"> <frameset rows="40%,40%,20%">
<frame src="all-classes.html"> <frame src="all-classes.html">
<frame src="all-modules.html">
<frame src="all-methods.html"> <frame src="all-methods.html">
</frameset> </frameset>
<frame name="main" src="#{main_page}"> <frame name="main" src="#{main_page}">
Expand Down
Loading

0 comments on commit 2b8a715

Please sign in to comment.