This method is deprecated or moved on the latest stable version.
The last existing version (v1_8_7_330) is shown here.
gen_url(path, target)
public
convert a target url to one that is relative to a given path
# File lib/rdoc/generators/html_generator.rb, line 1138
def HTMLGenerator.gen_url(path, target)
from = File.dirname(path)
to, to_file = File.split(target)
from = from.split("/")
to = to.split("/")
while from.size > 0 and to.size > 0 and from[0] == to[0]
from.shift
to.shift
end
from.fill("..")
from.concat(to)
from << to_file
File.join(*from)
end