Class: GetOptions
- Inherits:
-
Object
- Object
- GetOptions
- Defined in:
- lib/ruby-getoptions.rb
Class Method Summary collapse
-
.parse(args, option_map = {}, options = {}) ⇒ Object
External method, this is the main interface.
Class Method Details
.parse(args, option_map = {}, options = {}) ⇒ Object
External method, this is the main interface
40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/ruby-getoptions.rb', line 40 def self.parse(args, option_map = {}, = {}) @options = @option_map = {} set_logging() @log.info "input args: '#{args}'" @log.info "input option_map: '#{option_map}'" @log.info "input options: '#{}'" @option_map = generate_extended_option_map(option_map) option_result, remaining_args = iterate_over_arguments(args, [:mode]) @log.debug "option_result: '#{option_result}', remaining_args: '#{remaining_args}'" @log = nil [option_result, remaining_args] end |