Method: Iri#to_local

Defined in:
lib/iri.rb

#to_localIri

Creates a new Iri object with only the local parts of the URI.

Removes the host, the port, and the scheme, returning only the local address. For example, converting “google.com/foo” into “/foo”. The path, query string, and fragment are preserved.

Returns:

  • (Iri)

    A new Iri object with local:true and the same URI

See Also:



113
114
115
# File 'lib/iri.rb', line 113

def to_local
  Iri.new(@uri, local: true, safe: @safe)
end