Class: Semgrep::Changes::Options

Inherits:
Object
  • Object
show all
Defined in:
lib/semgrep/changes/options.rb

Defined Under Namespace

Classes: Options

Instance Method Summary collapse

Constructor Details

#initializeOptions

Returns a new instance of Options.



10
11
12
# File 'lib/semgrep/changes/options.rb', line 10

def initialize
  @args = Options.new(nil, false, nil, 'main') # Defaults
end

Instance Method Details

#parse!Object



14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/semgrep/changes/options.rb', line 14

def parse!
  OptionParser.new do |opts|
    opts.banner = 'Usage: semgrep-changes [options]'

    parse_report!(opts)
    parse_commit!(opts)
    parse_quiet!(opts)
    parse_help!(opts)
    parse_version!(opts)
    parse_base_branch!(opts)
  end.parse!

  args
end