def common_options(opts)
opts.separator ""
opts.separator "Other options:"
opts.on('-e', '--load FILE', 'A Ruby script to load before running command.') do |file|
load_script(file)
end
opts.on('--plugin PLUGIN', 'Load a YARD plugin (gem with `yard-\' prefix)') do |name|
end
opts.on('--legacy', 'Use old style Ruby parser and handlers. ',
' Always on in 1.8.x.') do
YARD::Parser::SourceParser.parser_type = :ruby18
end
opts.on('--safe', 'Enable safe mode for this instance') do
end
opts.on_tail('-q', '--quiet', 'Show no warnings.') { log.level = Logger::ERROR }
opts.on_tail('--verbose', 'Show more information.') { log.level = Logger::INFO }
opts.on_tail('--debug', 'Show debugging information.') { log.level = Logger::DEBUG }
opts.on_tail('--backtrace', 'Show stack traces') { log.show_backtraces = true }
opts.on_tail('-v', '--version', 'Show version.') { puts "yard #{YARD::VERSION}"; exit }
opts.on_tail('-h', '--help', 'Show this help.') { puts opts; exit }
end