diff options
author | dave <dave@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-03-24 19:17:42 +0000 |
---|---|---|
committer | dave <dave@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-03-24 19:17:42 +0000 |
commit | e147632bffc50fd33f5b5d6f5716e3627985c0d1 (patch) | |
tree | 6fe0f58e188d534e5e0aea0661119dfb4b6a2a94 /lib/rdoc/ri/ri_display.rb | |
parent | 16040850af57472ad0ec20fb9f86277c9527458d (diff) |
Add the --list-names option
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6020 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rdoc/ri/ri_display.rb')
-rw-r--r-- | lib/rdoc/ri/ri_display.rb | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/lib/rdoc/ri/ri_display.rb b/lib/rdoc/ri/ri_display.rb index 1e371350dc..8e5d07ee6c 100644 --- a/lib/rdoc/ri/ri_display.rb +++ b/lib/rdoc/ri/ri_display.rb @@ -165,8 +165,7 @@ class DefaultDisplay def list_known_classes(classes) if classes.empty? - puts "Before using ri, you need to generate documentation" - puts "using 'rdoc' with the --ri option" + warn_no_database else page do @formatter.draw_line("Known classes and modules") @@ -178,6 +177,18 @@ class DefaultDisplay ###################################################################### + def list_known_names(names) + if names.empty? + warn_no_database + else + page do + names.each {|n| @formatter.raw_print_line(n)} + end + end + end + + ###################################################################### + private ###################################################################### @@ -236,5 +247,10 @@ class DefaultDisplay end end - + ###################################################################### + + def warn_no_database + puts "Before using ri, you need to generate documentation" + puts "using 'rdoc' with the --ri option" + end end # class RiDisplay |