class Asciidoctor::PDF::SectionInfoByPage

Public Class Methods

new(title_method) click to toggle source
# File lib/asciidoctor/pdf/section_info_by_page.rb, line 6
def initialize title_method
  @table = {}
  @title_method = title_method
end

Public Instance Methods

[](pgnum) click to toggle source
# File lib/asciidoctor/pdf/section_info_by_page.rb, line 19
def [] pgnum
  @table[pgnum]
end
[]=(pgnum, val) click to toggle source
# File lib/asciidoctor/pdf/section_info_by_page.rb, line 11
def []= pgnum, val
  if ::Asciidoctor::Section === val
    @table[pgnum] = { title: val.send(*@title_method), numeral: val.numeral }
  else
    @table[pgnum] = { title: val }
  end
end