Module | Options::OptionList |
In: |
options.rb
doc-tmp/rdoc/options.rb |
OPTION_LIST | = | [ [ "--accessor", "-A", "accessorname[,..]", "comma separated list of additional class methods\n" + "that should be treated like 'attr_reader' and\n" + "friends. Option may be repeated. Each accessorname\n" + "may have '=text' appended, in which case that text\n" + "appears where the r/w/rw appears for normal accessors."], [ "--all", "-a", nil, "include all methods (not just public)\nin the output" ], [ "--charset", "-c", "charset", "specifies HTML character-set" ], [ "--debug", "-D", nil, "displays lots on internal stuff" ], [ "--diagram", "-d", nil, "Generate diagrams showing modules and classes.\n" + "You need dot V1.8.6 or later to use the --diagram\n" + "option correctly. Dot is available from\n"+ "http://www.research.att.com/sw/tools/graphviz/" ], [ "--mathml", "-l", nil, "TeX formatted formula is converted to MathML.\n" + "You need mathml.rb V0.6b to use the --mathml\n" + "option correctly. mathml.rb V0.6b is available from\n"+ "http://www.hinet.mydns.jp/~hiraku/data/files/mathml-0.6b.tar.gz" ], [ "--exclude", "-x", "pattern", "do not process files or directories matching\n" + "pattern. Files given explicitly on the command\n" + "line will never be excluded." ], [ "--extension", "-E", "new=old", "Treat files ending with .new as if they ended with\n" + ".old. Using '-E cgi=rb' will cause xxx.cgi to be\n" + "parsed as a Ruby file"], [ "--fileboxes", "-F", nil, "classes are put in boxes which represents\n" + "files, where these classes reside. Classes\n" + "shared between more than one file are\n" + "shown with list of files that sharing them.\n" + "Silently discarded if --diagram is not given\n" + "Experimental." ], [ "--force-update", "-U", nil, "forces to scan all sources even if newer than\n" + "the flag file." ], [ "--fmt", "-f", "format name", "set the output formatter (see below)" ], [ "--help", "-h", nil, "you're looking at it" ], [ "--help-output", "-O", nil, "explain the various output options" ], [ "--ignore-case", "-C", nil, "The case of names of classes or modules\n" + "or methods are ignored" ], [ "--image-format", "-I", "gif/png/jpg/jpeg", "Sets output image format for diagrams. Can\n" + "be png, gif, jpeg, jpg. If this option is\n" + "omitted, png is used. Requires --diagram." ], [ "--include", "-i", "dir[,dir...]", "set (or add to) the list of directories\n" + "to be searched when satisfying :include:\n" + "requests. Can be used more than once." ], [ "--inline-source", "-S", nil, "Show method source code inline, rather\n" + "than via a popup link" ], [ "--line-numbers", "-N", nil, "Include line numbers in the source code" ], [ "--main", "-m", "name", "'name' will be the initial page displayed" ], [ "--merge", "-M", nil, "when creating ri output, merge processed classes\n" + "into previously documented classes of the name name"], [ "--one-file", "-1", nil, "put all the output into a single file" ], [ "--op", "-o", "dir", "set the output directory" ], [ "--opname", "-n", "name", "Set the 'name' of the output. Has no\n" + "effect for HTML." ], [ "--promiscuous", "-p", nil, "When documenting a file that contains a module\n" + "or class also defined in other files, show\n" + "all stuff for that module/class in each files\n" + "page. By default, only show stuff defined in\n" + "that particular file." ], [ "--quiet", "-q", nil, "don't show progress as we parse" ], [ "--ri", "-r", nil, "generate output for use by 'ri.' The files are\n" + "stored in the '.rdoc' directory under your home\n"+ "directory unless overridden by a subsequent\n" + "--op parameter, so no special privileges are needed." ], [ "--ri-site", "-R", nil, "generate output for use by 'ri.' The files are\n" + "stored in a site-wide directory, making them accessible\n"+ "to others, so special privileges are needed." ], [ "--ri-system", "-Y", nil, "generate output for use by 'ri.' The files are\n" + "stored in a system-level directory, making them accessible\n"+ "to others, so special privileges are needed. This option\n"+ "is intended to be used during Ruby installations" ], [ "--show-hash", "-H", nil, "A name of the form #name in a comment\n" + "is a possible hyperlink to an instance\n" + "method name. When displayed, the '#' is\n" + "removed unless this option is specified" ], [ "--style", "-s", "stylesheet url", "specifies the URL of a separate stylesheet." ], [ "--tab-width", "-w", "n", "Set the width of tab characters (default 8)"], [ "--template", "-T", "template name", "Set the template used when generating output" ], [ "--title", "-t", "text", "Set 'txt' as the title for the output" ], [ "--version", "-v", nil, "display RDoc's version" ], [ "--webcvs", "-W", "url", "Specify a URL for linking to a web frontend\n" + "to CVS. If the URL contains a '\%s', the\n" + "name of the current file will be substituted;\n" + "if the URL doesn't contain a '\%s', the\n" + "filename will be appended to it." ], ] |
OPTION_LIST | = | [ [ "--accessor", "-A", "accessorname[,..]", "comma separated list of additional class methods\n" + "that should be treated like 'attr_reader' and\n" + "friends. Option may be repeated. Each accessorname\n" + "may have '=text' appended, in which case that text\n" + "appears where the r/w/rw appears for normal accessors."], [ "--all", "-a", nil, "include all methods (not just public)\nin the output" ], [ "--charset", "-c", "charset", "specifies HTML character-set" ], [ "--debug", "-D", nil, "displays lots on internal stuff" ], [ "--diagram", "-d", nil, "Generate diagrams showing modules and classes.\n" + "You need dot V1.8.6 or later to use the --diagram\n" + "option correctly. Dot is available from\n"+ "http://www.research.att.com/sw/tools/graphviz/" ], [ "--mathml", "-l", nil, "TeX formatted formula is converted to MathML.\n" + "You need mathml.rb V0.6b to use the --mathml\n" + "option correctly. mathml.rb V0.6b is available from\n"+ "http://www.hinet.mydns.jp/~hiraku/data/files/mathml-0.6b.tar.gz" ], [ "--exclude", "-x", "pattern", "do not process files or directories matching\n" + "pattern. Files given explicitly on the command\n" + "line will never be excluded." ], [ "--extension", "-E", "new=old", "Treat files ending with .new as if they ended with\n" + ".old. Using '-E cgi=rb' will cause xxx.cgi to be\n" + "parsed as a Ruby file"], [ "--fileboxes", "-F", nil, "classes are put in boxes which represents\n" + "files, where these classes reside. Classes\n" + "shared between more than one file are\n" + "shown with list of files that sharing them.\n" + "Silently discarded if --diagram is not given\n" + "Experimental." ], [ "--force-update", "-U", nil, "forces to scan all sources even if newer than\n" + "the flag file." ], [ "--fmt", "-f", "format name", "set the output formatter (see below)" ], [ "--help", "-h", nil, "you're looking at it" ], [ "--help-output", "-O", nil, "explain the various output options" ], [ "--ignore-case", "-C", nil, "The case of names of classes or modules\n" + "or methods are ignored" ], [ "--image-format", "-I", "gif/png/jpg/jpeg", "Sets output image format for diagrams. Can\n" + "be png, gif, jpeg, jpg. If this option is\n" + "omitted, png is used. Requires --diagram." ], [ "--include", "-i", "dir[,dir...]", "set (or add to) the list of directories\n" + "to be searched when satisfying :include:\n" + "requests. Can be used more than once." ], [ "--inline-source", "-S", nil, "Show method source code inline, rather\n" + "than via a popup link" ], [ "--line-numbers", "-N", nil, "Include line numbers in the source code" ], [ "--main", "-m", "name", "'name' will be the initial page displayed" ], [ "--merge", "-M", nil, "when creating ri output, merge processed classes\n" + "into previously documented classes of the name name"], [ "--one-file", "-1", nil, "put all the output into a single file" ], [ "--op", "-o", "dir", "set the output directory" ], [ "--opname", "-n", "name", "Set the 'name' of the output. Has no\n" + "effect for HTML." ], [ "--promiscuous", "-p", nil, "When documenting a file that contains a module\n" + "or class also defined in other files, show\n" + "all stuff for that module/class in each files\n" + "page. By default, only show stuff defined in\n" + "that particular file." ], [ "--quiet", "-q", nil, "don't show progress as we parse" ], [ "--ri", "-r", nil, "generate output for use by 'ri.' The files are\n" + "stored in the '.rdoc' directory under your home\n"+ "directory unless overridden by a subsequent\n" + "--op parameter, so no special privileges are needed." ], [ "--ri-site", "-R", nil, "generate output for use by 'ri.' The files are\n" + "stored in a site-wide directory, making them accessible\n"+ "to others, so special privileges are needed." ], [ "--ri-system", "-Y", nil, "generate output for use by 'ri.' The files are\n" + "stored in a system-level directory, making them accessible\n"+ "to others, so special privileges are needed. This option\n"+ "is intended to be used during Ruby installations" ], [ "--show-hash", "-H", nil, "A name of the form #name in a comment\n" + "is a possible hyperlink to an instance\n" + "method name. When displayed, the '#' is\n" + "removed unless this option is specified" ], [ "--style", "-s", "stylesheet url", "specifies the URL of a separate stylesheet." ], [ "--tab-width", "-w", "n", "Set the width of tab characters (default 8)"], [ "--template", "-T", "template name", "Set the template used when generating output" ], [ "--title", "-t", "text", "Set 'txt' as the title for the output" ], [ "--version", "-v", nil, "display RDoc's version" ], [ "--webcvs", "-W", "url", "Specify a URL for linking to a web frontend\n" + "to CVS. If the URL contains a '\%s', the\n" + "name of the current file will be substituted;\n" + "if the URL doesn't contain a '\%s', the\n" + "filename will be appended to it." ], ] |
# File doc-tmp/rdoc/options.rb, line 338 338: def OptionList.help_output 339: OptionList.strip_output("How RDoc generates output depends on the output formatter being\nused, and on the options you give.\n\n- HTML output is normally produced into a number of separate files\n(one per class, module, and file, along with various indices).\nThese files will appear in the directory given by the --op\noption (doc/ by default).\n\n- XHTML output is the same as HTML.\n\n- XML output by default is written to standard output. If a\n--opname option is given, the output will instead be written\nto a file with that name in the output directory.\n\n- .chm files (Windows help files) are written in the --op directory.\nIf an --opname parameter is present, that name is used, otherwise\nthe file will be called rdoc.chm.\n\nFor information on other RDoc options, use \"rdoc --help\".\n") 340: exit 0 341: end
# File options.rb, line 338 338: def OptionList.help_output 339: OptionList.strip_output("How RDoc generates output depends on the output formatter being\nused, and on the options you give.\n\n- HTML output is normally produced into a number of separate files\n(one per class, module, and file, along with various indices).\nThese files will appear in the directory given by the --op\noption (doc/ by default).\n\n- XHTML output is the same as HTML.\n\n- XML output by default is written to standard output. If a\n--opname option is given, the output will instead be written\nto a file with that name in the output directory.\n\n- .chm files (Windows help files) are written in the --op directory.\nIf an --opname parameter is present, that name is used, otherwise\nthe file will be called rdoc.chm.\n\nFor information on other RDoc options, use \"rdoc --help\".\n") 340: exit 0 341: end
# File doc-tmp/rdoc/options.rb, line 260 260: def OptionList.options 261: OPTION_LIST.map do |long, short, arg,| 262: [ long, 263: short, 264: arg ? GetoptLong::REQUIRED_ARGUMENT : GetoptLong::NO_ARGUMENT 265: ] 266: end 267: end
# File options.rb, line 260 260: def OptionList.options 261: OPTION_LIST.map do |long, short, arg,| 262: [ long, 263: short, 264: arg ? GetoptLong::REQUIRED_ARGUMENT : GetoptLong::NO_ARGUMENT 265: ] 266: end 267: end
# File doc-tmp/rdoc/options.rb, line 270 270: def OptionList.strip_output(text) 271: text =~ /^\s+/ 272: leading_spaces = $& 273: text.gsub!(/^#{leading_spaces}/, '') 274: $stdout.puts text 275: end
# File options.rb, line 270 270: def OptionList.strip_output(text) 271: text =~ /^\s+/ 272: leading_spaces = $& 273: text.gsub!(/^#{leading_spaces}/, '') 274: $stdout.puts text 275: end
Show usage and exit
# File doc-tmp/rdoc/options.rb, line 289 289: def OptionList.usage(generator_names) 290: 291: puts 292: puts(VERSION_STRING) 293: puts 294: 295: name = File.basename($0) 296: 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") 297: 298: OPTION_LIST.each do |long, short, arg, desc| 299: opt = sprintf("%20s", "#{long}, #{short}") 300: oparg = sprintf("%-7s", arg) 301: print "#{opt} #{oparg}" 302: desc = desc.split("\n") 303: if arg.nil? || arg.length < 7 304: puts desc.shift 305: else 306: puts 307: end 308: desc.each do |line| 309: puts(" "*28 + line) 310: end 311: puts 312: end 313: 314: puts "\nAvailable output formatters: " + 315: generator_names.sort.join(', ') + "\n\n" 316: 317: puts "For information on where the output goes, use\n\n" 318: puts " rdoc --help-output\n\n" 319: 320: exit 0 321: end
Show usage and exit
# File options.rb, line 289 289: def OptionList.usage(generator_names) 290: 291: puts 292: puts(VERSION_STRING) 293: puts 294: 295: name = File.basename($0) 296: 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") 297: 298: OPTION_LIST.each do |long, short, arg, desc| 299: opt = sprintf("%20s", "#{long}, #{short}") 300: oparg = sprintf("%-7s", arg) 301: print "#{opt} #{oparg}" 302: desc = desc.split("\n") 303: if arg.nil? || arg.length < 7 304: puts desc.shift 305: else 306: puts 307: end 308: desc.each do |line| 309: puts(" "*28 + line) 310: end 311: puts 312: end 313: 314: puts "\nAvailable output formatters: " + 315: generator_names.sort.join(', ') + "\n\n" 316: 317: puts "For information on where the output goes, use\n\n" 318: puts " rdoc --help-output\n\n" 319: 320: exit 0 321: end