class Addressable::URI

def query=(new_query)

Parameters:
  • new_query (String, #to_str) -- The new query component.
def query=(new_query)
  if new_query && !new_query.respond_to?(:to_str)
    raise TypeError, "Can't convert #{new_query.class} into String."
  end
  @query = new_query ? new_query.to_str : nil
  # Reset dependant values
  @normalized_query = nil
  @uri_string = nil
  @hash = nil
end