Class: OptParser

Inherits:
OptParserInternal show all
Defined in:
lib/gitarro/opt_parser.rb

Overview

Opt_parser class, is for getting needed options

this is the public class used by backend

Instance Attribute Summary

Attributes inherited from OptParserInternal

#options

Instance Method Summary collapse

Methods inherited from OptParserInternal

#ck_mandatory_option, #initialize, #option_help, #parse, #raise_incorrect_syntax

Methods included from OptionalOptions

#branch_opt, #changed_since, #check_opt, #desc_opt, #file_opt, #force_test_opt, #git_opt, #https_opt, #no_shallow, #optional_options, #pr_number, #url_opt

Methods included from MandatoryOptions

#context_opt, #mandatory_options, #repo_opt, #test_opt

Constructor Details

This class inherits a constructor from OptParserInternal

Instance Method Details

#cmdline_optionsObject



199
200
201
202
203
204
205
206
207
208
# File 'lib/gitarro/opt_parser.rb', line 199

def cmdline_options
  @opt_parser = OptionParser.new do |opt|
    opt.banner = "Usage: gitarro.rb [options]\n\n"
    mandatory_options(opt)
    optional_options(opt)
    option_help(opt)
  end
  parse(@opt_parser)
  @options
end