class Ronn::Document

def path_for(type=nil)

appends it to the dirname of the source document.
Document#basename method to generate the basename part and
Construct a path for a file near the source file. Uses the
def path_for(type=nil)
  if @basename
    File.join(File.dirname(path), basename(type))
  else
    basename(type)
  end
end