lib/stepmod/utils/converters/stepmod_ext_description.rb in stepmod-utils-0.3.5 vs lib/stepmod/utils/converters/stepmod_ext_description.rb in stepmod-utils-0.3.7

- old
+ new

@@ -1,12 +1,12 @@ module Stepmod module Utils module Converters class StepmodExtDescription < ReverseAdoc::Converters::Base def convert(node, state = {}) - state = state.merge(schema_name: node['linkend']) - linkend = node['linkend'].split('.') + state = state.merge(schema_name: node["linkend"]) + linkend = node["linkend"].split(".") # We only want ENTITY entries, not their attributes # https://github.com/metanorma/iso-10303-2/issues/36#issuecomment-841300092 return nil if linkend.length != 2 @@ -30,15 +30,16 @@ end <<~TEMPLATE === #{linkend.last} - #{domain ? "domain:[" + domain + "]" : ""} + #{domain ? "domain:[#{domain}]" : ''} #{child_text} TEMPLATE end end - ReverseAdoc::Converters.register :ext_description, StepmodExtDescription.new + ReverseAdoc::Converters.register :ext_description, + StepmodExtDescription.new end end end