summaryrefslogtreecommitdiff
path: root/lib/rdoc/options.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-07-21 18:35:14 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-07-21 18:35:14 +0000
commitcd9e9c6debcf893ea5fa70e42dc1875afaf0066f (patch)
tree5921615c87529d73ed017b58ee1ce57ef6861cfc /lib/rdoc/options.rb
parentc62db0676bbb8051dac4f462240962e044db6cd4 (diff)
Update to RDoc 2.1.0 r112
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18147 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rdoc/options.rb')
-rw-r--r--lib/rdoc/options.rb31
1 files changed, 24 insertions, 7 deletions
diff --git a/lib/rdoc/options.rb b/lib/rdoc/options.rb
index 886d9f77cdc..d683a140224 100644
--- a/lib/rdoc/options.rb
+++ b/lib/rdoc/options.rb
@@ -108,11 +108,6 @@ class RDoc::Options
attr_reader :promiscuous
##
- # Don't display progress as we process the files
-
- attr_accessor :quiet
-
- ##
# Array of directories to search for files to satisfy an :include:
attr_reader :rdoc_include
@@ -150,6 +145,11 @@ class RDoc::Options
attr_reader :title
##
+ # Verbosity, zero means quiet
+
+ attr_accessor :verbosity
+
+ ##
# URL of web cvs frontend
attr_reader :webcvs
@@ -161,7 +161,6 @@ class RDoc::Options
@main_page = nil
@merge = false
@exclude = []
- @quiet = false
@generators = generators
@generator_name = 'html'
@generator = @generators[@generator_name]
@@ -180,6 +179,7 @@ class RDoc::Options
@extra_accessor_flags = {}
@promiscuous = false
@force_update = false
+ @verbosity = 1
@css = nil
@webcvs = nil
@@ -424,9 +424,15 @@ Usage: #{opt.program_name} [options] [names...]
opt.on("--quiet", "-q",
"Don't show progress as we parse.") do |value|
- @quiet = value
+ @verbosity = 0
+ end
+
+ opt.on("--verbose", "-v",
+ "Display extra progress as we parse.") do |value|
+ @verbosity = 2
end
+
opt.separator nil
opt.on("--ri", "-r",
@@ -559,6 +565,17 @@ Usage: #{opt.program_name} [options] [names...]
@title ||= string
end
+ ##
+ # Don't display progress as we process the files
+
+ def quiet
+ @verbosity.zero?
+ end
+
+ def quiet=(bool)
+ @verbosity = bool ? 0 : 1
+ end
+
private
##