class Asciidoctor::PDF::IndexTermGroup

Attributes

name[R]

Public Class Methods

new(name) click to toggle source
# File lib/asciidoctor/pdf/index_catalog.rb, line 81
def initialize name
  @name = name
  @terms = {}
end

Public Instance Methods

<=>(other) click to toggle source
# File lib/asciidoctor/pdf/index_catalog.rb, line 96
def <=> other
  (val = @name.casecmp other.name) == 0 ? @name <=> other.name : val
end
store_term(name, dest) click to toggle source
# File lib/asciidoctor/pdf/index_catalog.rb, line 86
def store_term name, dest
  term = (@terms[name] ||= (IndexTerm.new name))
  term.add_dest dest if dest
  term
end
terms() click to toggle source
# File lib/asciidoctor/pdf/index_catalog.rb, line 92
def terms
  @terms.empty? ? [] : @terms.values.sort
end