Extended maintenance of Ruby 1.9.3 ended on February 23, 2015. Read more

In Files

  • test/unit.rb


Public Class Methods

new(*, &block) click to toggle source
               # File test/unit.rb, line 33
def initialize(*, &block)
  @init_hook = block
  @options = nil

Public Instance Methods

option_parser() click to toggle source
               # File test/unit.rb, line 39
def option_parser
  @option_parser ||= OptionParser.new
process_args(args = []) click to toggle source
               # File test/unit.rb, line 43
def process_args(args = [])
  return @options if @options
  orig_args = args.dup
  options = {}
  opts = option_parser
  setup_options(opts, options)
  orig_args -= args
  args = @init_hook.call(args, options) if @init_hook
  non_options(args, options)
  @help = orig_args.map { |s| s =~ /[\s|&<>$()]/ ? s.inspect : s }.join " "
  @options = options
  if @options[:parallel]
    @files = args
    @args = orig_args

Commenting is here to help enhance the documentation. For example, code samples, or clarification of the documentation.

If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.

If you wish to post a correction of the docs, please do so, but also file bug report so that it can be corrected for the next release. Thank you.

If you want to help improve the Ruby documentation, please visit Documenting-ruby.org.