def params!(params, pos = 0)
      active_params = []
      to_delete     = []
      each_with_index do |arg, i|
        next if i < pos || arg.nil? || !arg.start_with?('-')

        param = params[(arg.start_with?('--') ? arg[2..-1] : arg[1..1]).to_sym]
        unless param.nil?
          to_delete << i
          scoped_args! param, i + 1 if param.is_a? Option
          active_params << param
        end
      end

      to_delete.reverse.each { |i| delete_at i }

      active_params
    end
def params!(params, pos = 0)
      active_params = []
      to_delete     = []
      each_with_index do |arg, i|
        next if i < pos || arg.nil? || !arg.start_with?('-')

        param = params[(arg.start_with?('--') ? arg[2..-1] : arg[1..1]).to_sym]
        unless param.nil?
          to_delete << i
          scoped_args! param, i + 1 if param.is_a? Option
          active_params << param
        end
      end

      to_delete.reverse.each { |i| delete_at i }

      active_params
    end
Selects active parameters from a list of available parameters

 For every option found in the argument list {#scoped_args!} is called to
 find the arguments for that option.

 All parameters found will be removed from the array.

 @param [Hash<Symbol, Parameter>] params A list of available parameters
 @param [Fixnum] pos The position of the first argument that should be
        checked. All arguments ahead of that position will be skipped.
 @return [Array<Parameter>] Parameters called from the given argument list
 @see #scoped_args