def %(values)
      unless is_form_representation?
        raise "wadl can't instantiate a representation of type #{mediaType}"
      end

      representation = []

      params.each { |param|
        name = param.name

        if param.fixed
          p_values = [param.fixed]
        elsif p_values = values[name] || values[name.to_sym]
          p_values = [p_values] if !param.repeating? || !p_values.respond_to?(:each) || p_values.respond_to?(:to_str)
        else
          raise ArgumentError, "Your proposed representation is missing a value for #{param.name}" if param.required?
        end

        p_values.each { |v| representation << "#{CGI.escape(name)}=#{CGI.escape(v.to_s)}" } if p_values
      }

      representation.join('&')
    end
def %(values)
      unless is_form_representation?
        raise "wadl can't instantiate a representation of type #{mediaType}"
      end

      representation = []

      params.each { |param|
        name = param.name

        if param.fixed
          p_values = [param.fixed]
        elsif p_values = values[name] || values[name.to_sym]
          p_values = [p_values] if !param.repeating? || !p_values.respond_to?(:each) || p_values.respond_to?(:to_str)
        else
          raise ArgumentError, "Your proposed representation is missing a value for #{param.name}" if param.required?
        end

        p_values.each { |v| representation << "#{CGI.escape(name)}=#{CGI.escape(v.to_s)}" } if p_values
      }

      representation.join('&')
    end
Creates a representation by plugging a set of parameters
 into a representation format.