Class: RDoc::Markup::Heading
| Relationships & Source Files | |
| Super Chains via Extension / Inclusion / Inheritance | |
|
Class Chain:
self,
Element
|
|
|
Instance Chain:
self,
Element
|
|
| Inherits: |
RDoc::Markup::Element
|
| Defined in: | lib/rdoc/markup/heading.rb |
Overview
Class Method Summary
-
.new(level, text) ⇒ Heading
constructor
: (Integer, String) -> void.
-
.to_html
A singleton plain HTML formatter for headings.
-
.to_label
A singleton
ToLabelformatter for headings.
Instance Attribute Summary
Instance Method Summary
-
#==(other)
: (Object) -> bool.
-
#accept(visitor)
: (untyped) -> void.
-
#aref
An HTML-safe anchor reference for this header.
-
#label(context = nil)
Creates a fully-qualified label which will include the label from
context. -
#plain_html
HTML markup of the text of this label without the surrounding header element.
-
#pretty_print(q)
: (PP) -> void.
Element - Inherited
| #accept | : (untyped) -> void. |
| #pretty_print | : (PP) -> void. |
Constructor Details
.new(level, text) ⇒ Heading
: (Integer, String) -> void
Class Method Details
.to_html
# File 'lib/rdoc/markup/heading.rb', line 31
def self.to_html @to_html ||= begin markup = Markup.new markup.add_regexp_handling CrossReference::CROSSREF_REGEXP, :CROSSREF to_html = Markup::ToHtml.new nil def to_html.handle_regexp_CROSSREF(target) target.text.sub(/^\\/, '') end to_html end end
.to_label
[ GitHub ]Instance Attribute Details
#level (rw)
: Integer
# File 'lib/rdoc/markup/heading.rb', line 21
attr_accessor :level
#text (readonly)
: String
# File 'lib/rdoc/markup/heading.rb', line 18
attr_reader :text
Instance Method Details
#==(other)
: (Object) -> bool
#accept(visitor)
: (untyped) -> void
# File 'lib/rdoc/markup/heading.rb', line 61
def accept(visitor) visitor.accept_heading(self) end
#aref
An HTML-safe anchor reference for this header. : () -> String
#label(context = nil)
Creates a fully-qualified label which will include the label from context. This helps keep ids unique in HTML. : (RDoc::Context?) -> String
#plain_html
HTML markup of the text of this label without the surrounding header element. : () -> String
#pretty_print(q)
: (PP) -> void