def parse_options_and_call_procs(*args)
      return args if args.empty?
      # empty proxy_options before populating via OptionParser
      # prevents duplication of options if the command is run twice
      proxy_options.clear
      @options.each_with_object(OptionParser.new) do |option, opts|
        opts.on(*option[:args], &option[:proc])
        opts
      end.parse! args
    end
def parse_options_and_call_procs(*args)
      return args if args.empty?
      # empty proxy_options before populating via OptionParser
      # prevents duplication of options if the command is run twice
      proxy_options.clear
      @options.each_with_object(OptionParser.new) do |option, opts|
        opts.on(*option[:args], &option[:proc])
        opts
      end.parse! args
    end
:stopdoc:

 Parses options and calls associated procs,
 returning the arguments remaining.