APIdock / Ruby
/
method

usage

ruby latest stable - Class: Options ::OptionList

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v1_8_7_330) is shown here.

usage(generator_names)
public

Show usage and exit

# File lib/rdoc/options.rb, line 272
 def OptionList.usage(generator_names)
 
 puts
 puts(VERSION_STRING)
 puts
 name = File.basename(0ドル)
 OptionList.strip_output("Usage:\n\n\#{name} [options] [names...]\n\nFiles are parsed, and the information they contain\ncollected, before any output is produced. This allows cross\nreferences between all files to be resolved. If a name is a\ndirectory, it is traversed. If no names are specified, all\nRuby files in the current directory (and subdirectories) are\nprocessed.\n\nOptions:\n\n")
 OPTION_LIST.each do |long, short, arg, desc|
 opt = sprintf("%20s", "#{long}, #{short}")
 oparg = sprintf("%-7s", arg)
 print "#{opt} #{oparg}"
 desc = desc.split("\n")
 if arg.nil? || arg.length < 7
 puts desc.shift
 else
 puts
 end
 desc.each do |line|
 puts(" "*28 + line)
 end
 puts
 end
 puts "\nAvailable output formatters: " +
 generator_names.sort.join(', ') + "\n\n"
 puts "For information on where the output goes, use\n\n"
 puts " rdoc --help-output\n\n"
 exit 0
 end

AltStyle によって変換されたページ (->オリジナル) /