In Files

  • test/unit.rb

Test::Unit::Options

Public Class Methods

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

Public Instance Methods

option_parser() click to toggle source
 
               # File test/unit.rb, line 39
def option_parser
  @option_parser ||= OptionParser.new
end
            
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)
  opts.parse!(args)
  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
  end
  options
end