0
@@ -26,6 +26,14 @@ module YARD
0
opts = OptionParser.new
0
+ opts.separator "General Options:"
0
+ opts.on('-b', '--db FILE', 'Use a specified .yardoc db to load from or save to. (defaults to .yardoc)') do |yfile|
0
+ YARD::Registry.yardoc_file = yfile
0
opts.on('--full', 'Full class diagrams (show methods and attributes).') do
0
@@ -34,32 +42,32 @@ module YARD
0
options[:dependencies] = true
0
- opts.on('--dot [OPTIONS]', 'Send the results direclty to `dot` with optional arguments.') do |dotopts|
0
- options[:serializer] = Serializers::ProcessSerializer.new('dot ' + dotopts.to_s)
0
- opts.on('-f', '--file [FILE]', 'Writes output to a file instead of stdout.') do |file|
0
- options[:serializer] = Serializers::FileSystemSerializer.new(:basepath => '.', :extension => nil)
0
- options[:serializer].instance_eval "def serialized_path(object) #{file.inspect} end"
0
+ opts.on('--no-public', "Don't show public methods. (default shows public)") do
0
+ options[:visibility].delete(:public)
0
- opts.on('--[no-]public', "Show or don't show public methods (default shows public)") do |value|
0
- options[:visibility].send(value ? :push : :delete, :public)
0
+ opts.on('--protected', "Show or don't show protected methods. (default hides protected)") do
0
+ options[:visibility].push(:protected)
0
- opts.on('--[no-]protected', "Show or don't show protected methods (default hides protected)") do |value|
0
- options[:visibility].send(value ? :push : :delete, :protected)
0
+ opts.on('--private', "Show or don't show private methods. (default hides private)") do
0
+ options[:visibility].push(:private)
0
- opts.on('--[no-]private', "Show or don't show private methods (default hides private)") do |value|
0
- options[:visibility].send(value ? :push : :delete, :private)
0
+ opts.separator "Output options:"
0
- opts.on('-t', '--template [TEMPLATE]',
0
- 'The template to use (defaults to "default")') do |template|
0
- options[:template] = template.to_sym
0
+ opts.on('--dot [OPTIONS]', 'Send the results direclty to `dot` with optional arguments.') do |dotopts|
0
+ options[:serializer] = Serializers::ProcessSerializer.new('dot ' + dotopts.to_s)
0
+ opts.on('-f', '--file [FILE]', 'Writes output to a file instead of stdout.') do |file|
0
+ options[:serializer] = Serializers::FileSystemSerializer.new(:basepath => '.', :extension => nil)
0
+ options[:serializer].instance_eval "def serialized_path(object) #{file.inspect} end"
0
+ opts.separator "Other options:"
0
opts.on_tail('-q', '--quiet', 'Show no warnings') { log.level = Logger::ERROR }
0
opts.on_tail('--verbose', 'Show debugging information') { log.level = Logger::DEBUG }
0
opts.on_tail('-v', '--version', 'Show version.') { puts "yard #{YARD::VERSION}"; exit }
Comments
No one has commented yet.