Module: RDoc::Generator::Markup (Ruby 2.4.2)
Description: Module : RDoc::Generator::Markup - Ruby 2.4.2

Support for the Ruby 2.4 series has ended. See here for reference.

### Home Classes Methods

### In Files

- rdoc/generator/markup.rb

### Methods

- #aref_to
- #as_href
- #cvs_url
- #description
- #formatter

### Class/Module Index

Quicksearch

- RDoc
- RDoc::Alias
- RDoc::AnonClass
- RDoc::AnyMethod
- RDoc::Attr
- RDoc::ClassModule
- RDoc::CodeObject
- RDoc::Comment
- RDoc::Constant
- RDoc::Context
- RDoc::Context::Section
- RDoc::CrossReference
- RDoc::ERBIO
- RDoc::ERBPartial
- RDoc::Encoding
- RDoc::Error
- RDoc::Extend
- RDoc::Generator
- RDoc::Generator::Darkfish
- RDoc::Generator::JsonIndex
- RDoc::Generator::Markup
- RDoc::Generator::POT
- RDoc::Generator::POT::MessageExtractor
- RDoc::Generator::POT::PO
- RDoc::Generator::POT::POEntry
- RDoc::Generator::RI
- RDoc::GhostMethod
- RDoc::I18n
- RDoc::I18n::Locale
- RDoc::I18n::Text
- RDoc::Include
- RDoc::Markdown
- RDoc::Markdown::Literals
- RDoc::Markup
- RDoc::Markup::AttrChanger
- RDoc::Markup::AttrSpan
- RDoc::Markup::AttributeManager
- RDoc::Markup::Attributes
- RDoc::Markup::BlankLine
- RDoc::Markup::BlockQuote
- RDoc::Markup::Document
- RDoc::Markup::Formatter
- RDoc::Markup::FormatterTestCase
- RDoc::Markup::HardBreak
- RDoc::Markup::Include
- RDoc::Markup::IndentedParagraph
- RDoc::Markup::List
- RDoc::Markup::ListItem
- RDoc::Markup::Paragraph
- RDoc::Markup::Parser
- RDoc::Markup::Parser::Error
- RDoc::Markup::Parser::ParseError
- RDoc::Markup::PreProcess
- RDoc::Markup::Raw
- RDoc::Markup::Rule
- RDoc::Markup::Special
- RDoc::Markup::TextFormatterTestCase
- RDoc::Markup::ToAnsi
- RDoc::Markup::ToBs
- RDoc::Markup::ToHtml
- RDoc::Markup::ToHtmlCrossref
- RDoc::Markup::ToHtmlSnippet
- RDoc::Markup::ToJoinedParagraph
- RDoc::Markup::ToLabel
- RDoc::Markup::ToMarkdown
- RDoc::Markup::ToRdoc
- RDoc::Markup::ToTableOfContents
- RDoc::Markup::ToTest
- RDoc::Markup::ToTtOnly
- RDoc::Markup::Verbatim
- RDoc::MetaMethod
- RDoc::MethodAttr
- RDoc::Mixin
- RDoc::NormalClass
- RDoc::NormalModule
- RDoc::Options
- RDoc::Parser
- RDoc::Parser::C
- RDoc::Parser::ChangeLog
- RDoc::Parser::Markdown
- RDoc::Parser::RD
- RDoc::Parser::Ruby
- RDoc::Parser::RubyTools
- RDoc::Parser::Simple
- RDoc::Parser::Text
- RDoc::RD
- RDoc::RD::BlockParser
- RDoc::RD::Inline
- RDoc::RD::InlineParser
- RDoc::RDoc
- RDoc::RI
- RDoc::RI::Driver
- RDoc::RI::Driver::Error
- RDoc::RI::Driver::NotFoundError
- RDoc::RI::Error
- RDoc::RI::Paths
- RDoc::RI::Task
- RDoc::Require
- RDoc::RubyLex
- RDoc::RubyLex::Error
- RDoc::RubyToken
- RDoc::RubygemsHook
- RDoc::Servlet
- RDoc::SingleClass
- RDoc::Stats
- RDoc::Stats::Normal
- RDoc::Stats::Quiet
- RDoc::Stats::Verbose
- RDoc::Store
- RDoc::Store::Error
- RDoc::Store::MissingFileError
- RDoc::Task
- RDoc::TestCase
- RDoc::Text
- RDoc::TokenStream
- RDoc::TomDoc
- RDoc::TopLevel
- RDocTask

No matching classes.

# RDoc::Generator::Markup

Handle common `RDoc::Markup` tasks for various CodeObjects

This module is loaded by generators. It allows RDoc's `CodeObject` tree to avoid loading generator code to improve startup time for `ri`.

### 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 13
    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 20
    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 will replace the %s using sprintf on the `url`.

                   # File rdoc/generator/markup.rb, line 50
    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 27
    def description
      markup @comment
    end

formatter() click to toggle source

Creates an `RDoc::Markup::ToHtmlCrossref` formatter

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

      options = @store.rdoc.options
      this = RDoc::Context === self ? self : @parent

      @formatter = RDoc::Markup::ToHtmlCrossref.new options, this.path, this
      @formatter.code_object = self
      @formatter
    end