diff options
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 |