Module: TestBoosters::CliParser

Defined in:
lib/test_boosters/cli_parser.rb

Class Method Summary collapse

Class Method Details

.parseObject



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/test_boosters/cli_parser.rb', line 5

def parse
  options = {}

  parser = OptionParser.new do |opts|
    opts.on("--thread INDEX") do |parameter|
      thread_index, thread_count, _rest = parameter.split("/")

      options[:thread_index] = thread_index.to_i
      options[:thread_count] = thread_count.to_i
    end
  end

  parser.parse!

  options
end