def convert_captured_values(values, request)
      value_hash = {}
      captures.each_with_index do |capture, index|

        # convert the value using the request convert_value function
        converted = request.convert_value(values[index], capture)
        value_hash[capture[:name]] ||= converted

        # Add items directly to the resulting hash from the converted value
        # if it is a hash and they are set in the :provides hash for this line definition
        if converted.is_a?(Hash) && capture[:provides].is_a?(Hash)
          capture[:provides].each do |name, type|
            value_hash[name] ||= request.convert_value(converted[name],  type: type)
          end
        end
      end
      value_hash
    end
def convert_captured_values(values, request)
      value_hash = {}
      captures.each_with_index do |capture, index|

        # convert the value using the request convert_value function
        converted = request.convert_value(values[index], capture)
        value_hash[capture[:name]] ||= converted

        # Add items directly to the resulting hash from the converted value
        # if it is a hash and they are set in the :provides hash for this line definition
        if converted.is_a?(Hash) && capture[:provides].is_a?(Hash)
          capture[:provides].each do |name, type|
            value_hash[name] ||= request.convert_value(converted[name],  type: type)
          end
        end
      end
      value_hash
    end
Updates a captures hash using the converters specified in the request
 and handle the :provides option in the line definition.