This method is deprecated or moved on the latest stable version.
The last existing version (v1_9_3_392) is shown here.
gen_relative_url(path, target)
public
Converts a target url to one that is relative to a given path
# File lib/rdoc/markup/to_html.rb, line 39
def self.gen_relative_url(path, target)
from = File.dirname path
to, to_file = File.split target
from = from.split "/"
to = to.split "/"
from.delete '.'
to.delete '.'
while from.size > 0 and to.size > 0 and from[0] == to[0] do
from.shift
to.shift
end
from.fill ".."
from.concat to
from << to_file
File.join(*from)
end