Sha256: 241e208363c8c05bdfd700960ea5b7c1694a964d9b8a3249396bdf28686778af

Contents?: true

Size: 455 Bytes

Versions: 3

Compression:

Stored size: 455 Bytes

Contents

module Integration

  class Arguments

    attr_reader :patterns
    attr_reader :train

    def initialize(argv)
      @train = false
      @patterns = []
      OptionParser.new do |opts|
        opts.banner << " [patterns]"
        opts.on('-t', '--train', 'Train tests') do |v|
          @train = v
        end
      end.parse!(argv)
      @patterns = argv
    rescue OptionParser::ParseError => e
      $stderr.puts e
      exit 1
    end

  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
basic101-0.4.0 test/integration/arguments.rb
basic101-0.2.0 test/integration/arguments.rb
basic101-0.1.0 test/integration/arguments.rb