Class: Stepmod::Utils::Converters::ModuleRef
- Inherits:
-
ReverseAdoc::Converters::Base
- Object
- ReverseAdoc::Converters::Base
- Stepmod::Utils::Converters::ModuleRef
- Defined in:
- lib/stepmod/utils/converters/module_ref.rb
Instance Method Summary collapse
Instance Method Details
#convert(node, _state = {}) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/stepmod/utils/converters/module_ref.rb', line 7 def convert(node, _state = {}) ref = node["linkend"] # #23: # In this case when we see this: # <module_ref linkend="product_as_individual:3_definition">individual products</module_ref> # We take the text value of the element and convert to this: # {{individual products}} ref = node.text.strip if !ref.empty? " {{#{normalized_ref(ref)}}} " elsif ref = node["linkend"].split(":").first " *#{ref}*" end end |