Class: DefMastership::UpdateDefVersionModifier

Inherits:
ModifierBase
  • Object
show all
Defined in:
lib/defmastership/update_def_version_modifier.rb

Overview

Update definition version if the definition has change since reference document

Instance Attribute Summary

Attributes inherited from ModifierBase

#changes, #config

Instance Method Summary collapse

Methods inherited from ModifierBase

#do_modifications, #initialize

Constructor Details

This class inherits a constructor from DefMastership::ModifierBase

Instance Method Details

#new_line_modifier(config, adoc_texts) ⇒ Object



12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/defmastership/update_def_version_modifier.rb', line 12

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

#replacementsObject



8
9
10
# File 'lib/defmastership/update_def_version_modifier.rb', line 8

def replacements
  %i[replace]
end