class Asciidoctor::PDF::IndexTermGroup

Attributes

name[R]

Public Class Methods

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

Public Instance Methods

<=>(other) click to toggle source
# File lib/asciidoctor-pdf/index_catalog.rb, line 95
def <=> other
  @name <=> other.name
end
find_term(name) click to toggle source
# File lib/asciidoctor-pdf/index_catalog.rb, line 87
def find_term name
  @terms[name]
end
store_term(name, dest = nil) click to toggle source
# File lib/asciidoctor-pdf/index_catalog.rb, line 81
def store_term name, dest = nil
  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 91
def terms
  @terms.empty? ? [] : @terms.values.sort
end