diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | lib/rdoc/generators/html_generator.rb | 15 |
2 files changed, 20 insertions, 1 deletions
@@ -1,3 +1,9 @@ +Tue Feb 24 07:23:30 2004 Dave Thomas <dave@pragprog.com> + + * lib/rdoc/generators/html_generator.rb: Deal with :stopdoc: when + choosing a default main page to display (ie. don't select a page + if we don't have documentation for it). + Tue Feb 24 06:40:14 2004 Dave Thomas <dave@pragprog.com> * lib/rdoc/parsers/parse_rb.rb (RubyLex::identify_identifier): Handle diff --git a/lib/rdoc/generators/html_generator.rb b/lib/rdoc/generators/html_generator.rb index a6a38f6a5c..8db578b934 100644 --- a/lib/rdoc/generators/html_generator.rb +++ b/lib/rdoc/generators/html_generator.rb @@ -1276,7 +1276,20 @@ module Generators end end - ref = @files[0].path unless ref + unless ref + for file in @files + if file.document_self + ref = file.path + break + end + end + end + + unless ref + $stderr.puts "Couldn't find anything to document" + $stderr.puts "Perhaps you've used :stopdoc: in all classes" + exit(1) + end ref end |