def query=(query)
      raise ArgumentError, "Invalid URL: #{self.url}" unless self.url.respond_to?(:query)
      if query.kind_of?(Hash)
        query = build_query_from_hash(query)
      end
      query = query.to_s unless query.is_a?(String)
      self.url.query = query
    end
def query=(query)
      raise ArgumentError, "Invalid URL: #{self.url}" unless self.url.respond_to?(:query)
      if query.kind_of?(Hash)
        query = build_query_from_hash(query)
      end
      query = query.to_s unless query.is_a?(String)
      self.url.query = query
    end
Sets the +query+ from +url+. Raises an +ArgumentError+ unless the +url+ is valid.