Class: AgileNotifier::Commander

Inherits:
Object
  • Object
show all
Defined in:
lib/agile_notifier/commander.rb

Class Method Summary collapse

Class Method Details

.order(args) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
# File 'lib/agile_notifier/commander.rb', line 6

def order(args)
  options = {}
  OptionParser.new do |opts|
    opts.banner = "Usage: #{caller[-1].match(/\S+\.rb/)} [options]"
    
    opts.on('-b', '--build-number [BUILD_NUMBER]', OptionParser::DecimalInteger, 'Trigger by specific build') do |build_number|
      options[:build_number] = build_number
    end
  end.parse!
  options
end