Class: Stepmod::Utils::Converters::StepmodExtDescription

Inherits:
ReverseAdoc::Converters::Base
  • Object
show all
Defined in:
lib/stepmod/utils/converters/stepmod_ext_description.rb

Instance Method Summary collapse

Instance Method Details

#convert(node, state = {}) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/stepmod/utils/converters/stepmod_ext_description.rb', line 5

def convert(node, state = {})
  state = state.merge(schema_name: node['linkend'])
  linkend = node['linkend'].split('.')

  # We ignore all the WHERE and IP rules because those are not terms
  return nil if linkend.last =~ /^wr/

  <<~TEMPLATE
    === #{node['linkend'].split('.').last}

    <STEP resource> #{treat_children(node, state).strip}
  TEMPLATE
end