Class: Asciidoctor::Standoc::TermLookupCleanup

Inherits:
Object
  • Object
show all
Defined in:
lib/asciidoctor/standoc/term_lookup_cleanup.rb

Overview

Intelligent term lookup xml modifier

Constant Summary collapse

AUTOMATIC_GENERATED_ID_REGEXP =
/\A_/.freeze
EXISTING_TERM_REGEXP =
/\Aterm-/.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(xmldoc, log) ⇒ TermLookupCleanup

Returns a new instance of TermLookupCleanup.



12
13
14
15
16
17
# File 'lib/asciidoctor/standoc/term_lookup_cleanup.rb', line 12

def initialize(xmldoc, log)
  @xmldoc = xmldoc
  @log = log
  @termlookup = {}
  @idhash = {}
end

Instance Attribute Details

#logObject (readonly)

Returns the value of attribute log.



10
11
12
# File 'lib/asciidoctor/standoc/term_lookup_cleanup.rb', line 10

def log
  @log
end

#termlookupObject (readonly)

Returns the value of attribute termlookup.



10
11
12
# File 'lib/asciidoctor/standoc/term_lookup_cleanup.rb', line 10

def termlookup
  @termlookup
end

#xmldocObject (readonly)

Returns the value of attribute xmldoc.



10
11
12
# File 'lib/asciidoctor/standoc/term_lookup_cleanup.rb', line 10

def xmldoc
  @xmldoc
end

Instance Method Details

#callObject



19
20
21
22
23
# File 'lib/asciidoctor/standoc/term_lookup_cleanup.rb', line 19

def call
  @idhash = populate_idhash
  @termlookup = replace_automatic_generated_ids_terms
  set_termxref_tags_target
end