class Asciidoctor::PDF::IndexTermGroup
Attributes
Public Class Methods
Source
# File lib/asciidoctor/pdf/index_catalog.rb, line 112 def initialize name @name = name @terms = {} end
Public Instance Methods
Source
# File lib/asciidoctor/pdf/index_catalog.rb, line 136 def <=> other (val = @name.casecmp other.name) == 0 ? @name <=> other.name : val end
Source
# File lib/asciidoctor/pdf/index_catalog.rb, line 117 def store_term name, dest, assoc = {} term = (@terms[name] ||= (IndexTerm.new name)) term.add_dest dest if dest term.associations ||= {} unless assoc.empty? if !term.associations[:see] && (see = assoc[:see]) term.associations[:see] = see end if (see_also = assoc[:see_also]) (term.associations[:see_also] ||= []).concat see_also end end term end
Source
# File lib/asciidoctor/pdf/index_catalog.rb, line 132 def terms @terms.empty? ? [] : @terms.values.sort end