class Ronn::Reference

The #url method should be used to obtain the href value for HTML.
- Relative paths to ronn manuals: “crontab.5.ronn”
- URLs: “man.cx/crontab(5)”
of locations:
An individual index reference. A reference can point to one of a few types

def initialize(index, name, location)

def initialize(index, name, location)
  @index = index
  @name = name
  @location = location
end

def manual?

def manual?
  name =~ /\([0-9]\w*\)$/
end

def path

def path
  File.expand_path(location, File.dirname(@index.path)) if relative?
end

def relative?

def relative?
  !remote?
end

def remote?

def remote?
  location =~ /^(?:https?|mailto):/
end

def ronn?

def ronn?
  location =~ /\.ronn?$/
end

def url

def url
  if remote?
    location
  else
    location.chomp('.ronn') + '.html'
  end
end