# Copyright (c) 2020 Jerome Arbez-Gindre # frozen_string_literal: true module DefMastership # Update definition version if the definition has change since # reference document class UpdateDefVersionModifier < ModifierBase def replacements %i[replace] end def new_line_modifier(config, adoc_texts) document = Document.new adoc_texts.each do |adoc_file, _| document.parse_file_with_preprocessor(adoc_file) end ref_document = Document.new ref_document.parse_file_with_preprocessor(config[:ref_document]) line_modifier = UpdateDefVersionLineModifier.from_config(config) line_modifier.document = document line_modifier.ref_document = ref_document line_modifier end end end