This method is deprecated or moved on the latest stable version.
The last existing version (v2_2_9) is shown here.
gen_url(url, text)
public
Returns just the text of link,url is only used to
determine the link type.
# File lib/rdoc/markup/to_html_snippet.rb, line 167
def gen_url url, text
if url =~ /^rdoc-label:([^:]*)(?::(.*))?/ then
type = "link"
elsif url =~ /([A-Za-z]+):(.*)/ then
type = $1
else
type = "http"
end
if (type == "http" or type == "https" or type == "link") and
url =~ /\.(gif|png|jpg|jpeg|bmp)$/ then
''
else
text.sub(%^#{type}:/*%, '')
end
end