def omit(*components)
      invalid_components = components - [
        :scheme, :user, :password, :userinfo, :host, :port, :authority,
        :path, :query, :fragment
      ]
      unless invalid_components.empty?
        raise ArgumentError,
          "Invalid component names: #{invalid_components.inspect}."
      end
      duplicated_uri = self.dup
      duplicated_uri.defer_validation do
        components.each do |component|
          duplicated_uri.send((component.to_s + "=").to_sym, nil)
        end
        duplicated_uri.user = duplicated_uri.normalized_user
      end
      duplicated_uri
    end
def omit(*components)
      invalid_components = components - [
        :scheme, :user, :password, :userinfo, :host, :port, :authority,
        :path, :query, :fragment
      ]
      unless invalid_components.empty?
        raise ArgumentError,
          "Invalid component names: #{invalid_components.inspect}."
      end
      duplicated_uri = self.dup
      duplicated_uri.defer_validation do
        components.each do |component|
          duplicated_uri.send((component.to_s + "=").to_sym, nil)
        end
        duplicated_uri.user = duplicated_uri.normalized_user
      end
      duplicated_uri
    end
Returns <code>true</code> if the URI objects are equal. This method
 normalizes both URIs before doing the comparison, and allows comparison
 against <code>Strings</code>.

 @param [Object] uri The URI to compare.

 @return [TrueClass, FalseClass]
   <code>true</code> if the URIs are equivalent, <code>false</code>
   otherwise.

 Returns <code>true</code> if the URI objects are equal. This method
 normalizes both URIs before doing the comparison.

 @param [Object] uri The URI to compare.

 @return [TrueClass, FalseClass]
   <code>true</code> if the URIs are equivalent, <code>false</code>
   otherwise.

 Returns <code>true</code> if the URI objects are equal. This method
 does NOT normalize either URI before doing the comparison.

 @param [Object] uri The URI to compare.

 @return [TrueClass, FalseClass]
   <code>true</code> if the URIs are equivalent, <code>false</code>
   otherwise.

 A hash value that will make a URI equivalent to its normalized
 form.

 @return [Integer] A hash of the URI.

 Clones the URI object.

 @return [Addressable::URI] The cloned URI.

 Omits components from a URI.

 @param [Symbol] *components The components to be omitted.

 @return [Addressable::URI] The URI with components omitted.

 @example
   uri = Addressable::URI.parse("http://example.com/path?query")
   #=> #<Addressable::URI:0xcc5e7a URI:http://example.com/path?query>
   uri.omit(:scheme, :authority)
   #=> #<Addressable::URI:0xcc4d86 URI:/path?query>