Method: Addressable::URI#route_to
- Defined in:
- lib/addressable/uri.rb
#route_to(uri) ⇒ Addressable::URI
Returns the shortest normalized relative form of the supplied URI that uses this URI as a base for resolution. Returns an absolute URI if necessary. This is effectively the opposite of route_from
.
2150 2151 2152 |
# File 'lib/addressable/uri.rb', line 2150 def route_to(uri) return URI.parse(uri).route_from(self) end |