In Files

  • rdoc/generator/markup.rb

Class/Module Index [+]

Quicksearch

RDoc::Generator::Markup

Handle common RDoc::Markup tasks for various CodeObjects

Public Instance Methods

aref_to(target_path) click to toggle source

Generates a relative URL from this object’s path to target_path

 
               # File rdoc/generator/markup.rb, line 18
def aref_to(target_path)
  RDoc::Markup::ToHtml.gen_relative_url path, target_path
end
            
as_href(from_path) click to toggle source

Generates a relative URL from from_path to this object’s path

 
               # File rdoc/generator/markup.rb, line 25
def as_href(from_path)
  RDoc::Markup::ToHtml.gen_relative_url from_path, path
end
            
cvs_url(url, full_path) click to toggle source

Build a webcvs URL starting for the given url with full_path appended as the destination path. If url contains ‘%s’ full_path will be sprintf’d into url instead.

 
               # File rdoc/generator/markup.rb, line 55
def cvs_url(url, full_path)
  if /%s/ =~ url then
    sprintf url, full_path
  else
    url + full_path
  end
end
            
description() click to toggle source

Handy wrapper for marking up this object’s comment

 
               # File rdoc/generator/markup.rb, line 32
def description
  markup @comment
end
            
formatter() click to toggle source

Creates an RDoc::Markup::ToHtmlCrossref formatter

 
               # File rdoc/generator/markup.rb, line 39
def formatter
  return @formatter if defined? @formatter

  show_hash = RDoc::RDoc.current.options.show_hash
  hyperlink_all = RDoc::RDoc.current.options.hyperlink_all
  this = RDoc::Context === self ? self : @parent

  @formatter = RDoc::Markup::ToHtmlCrossref.new(this.path, this, show_hash,
                                                hyperlink_all)
end
            

Commenting is here to help enhance the documentation. For example, code samples, or clarification of the documentation.

If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.

If you wish to post a correction of the docs, please do so, but also file bug report so that it can be corrected for the next release. Thank you.

If you want to help improve the Ruby documentation, please visit Documenting-ruby.org.

blog comments powered by Disqus