Skip to content
instance method

URI::Generic#route_from

(::String oth) -> ::URI::Generic
route_from(oth)

Args

oth

URI or String

Description

Calculates relative path from oth to self.

Usage

Example
require 'uri'

uri = URI.parse('http://my.example.com/main.rbx?page=1')
uri.route_from('http://my.example.com')
#=> #<URI::Generic /main.rbx?page=1>
See also #replace! #route_to #relative? #scheme= also in 4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0