Class: Asciidoctor::Standoc::TermLookupCleanup
- Inherits:
-
Object
- Object
- Asciidoctor::Standoc::TermLookupCleanup
- 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
- EXISTING_SYMBOL_REGEXP =
/\Asymbol-/.freeze
Instance Attribute Summary collapse
-
#log ⇒ Object
readonly
Returns the value of attribute log.
-
#termlookup ⇒ Object
readonly
Returns the value of attribute termlookup.
-
#xmldoc ⇒ Object
readonly
Returns the value of attribute xmldoc.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(xmldoc, log) ⇒ TermLookupCleanup
constructor
A new instance of TermLookupCleanup.
Constructor Details
#initialize(xmldoc, log) ⇒ TermLookupCleanup
Returns a new instance of TermLookupCleanup.
15 16 17 18 19 20 |
# File 'lib/asciidoctor/standoc/term_lookup_cleanup.rb', line 15 def initialize(xmldoc, log) @xmldoc = xmldoc @log = log @termlookup = { term: {}, symbol: {}, secondary2primary: {} } @idhash = {} end |
Instance Attribute Details
#log ⇒ Object (readonly)
Returns the value of attribute log.
13 14 15 |
# File 'lib/asciidoctor/standoc/term_lookup_cleanup.rb', line 13 def log @log end |
#termlookup ⇒ Object (readonly)
Returns the value of attribute termlookup.
13 14 15 |
# File 'lib/asciidoctor/standoc/term_lookup_cleanup.rb', line 13 def termlookup @termlookup end |
#xmldoc ⇒ Object (readonly)
Returns the value of attribute xmldoc.
13 14 15 |
# File 'lib/asciidoctor/standoc/term_lookup_cleanup.rb', line 13 def xmldoc @xmldoc end |
Instance Method Details
#call ⇒ Object
22 23 24 25 26 27 28 |
# File 'lib/asciidoctor/standoc/term_lookup_cleanup.rb', line 22 def call @idhash = populate_idhash @termlookup = replace_automatic_generated_ids_terms concept_cleanup end |