Class: Asciidoctor::Section
- Inherits:
-
Object
- Object
- Asciidoctor::Section
- Defined in:
- lib/asciidoctor-multipage.rb
Instance Attribute Summary collapse
-
#mplevel ⇒ Object
Allow the section type (:root, :branch, :leaf) to be saved for each section.
Instance Method Summary collapse
Instance Attribute Details
#mplevel ⇒ Object
Allow the section type (:root, :branch, :leaf) to be saved for each section
88 89 90 |
# File 'lib/asciidoctor-multipage.rb', line 88 def mplevel @mplevel end |
Instance Method Details
#sectnum(delimiter = '.', append = nil) ⇒ Object
96 97 98 99 100 101 102 103 104 |
# File 'lib/asciidoctor-multipage.rb', line 96 def sectnum(delimiter = '.', append = nil) append ||= (append == false ? '' : delimiter) if @level > 1 and @parent.class == Asciidoctor::Section || (@mplevel && @parent.class == Asciidoctor::Document) %(#{@parent.sectnum(delimiter)}#{@numeral}#{append}) else %(#{@numeral}#{append}) end end |