Class: Defmastership::Modifier::UpdateIrefChecksum
- Inherits:
-
UpdateIref
- Object
- UpdateIref
- Defmastership::Modifier::UpdateIrefChecksum
- Includes:
- ModifierCommon
- Defined in:
- lib/defmastership/modifier/update_iref_checksum.rb
Overview
Update internal refs checksum
Defined Under Namespace
Modules: Helper
Instance Attribute Summary
Attributes included from ModifierCommon
Class Method Summary collapse
-
.replacement_methods ⇒ Array<Symbol>
Methods’s symbols will be called in sequence to perform the document modifications.
Instance Method Summary collapse
-
#replace_irefs(_filename, line) ⇒ String
Replace the definition’s internal ref in the line if relevant.
Methods included from ModifierCommon
#do_modifications, #method_missing, #respond_to_missing?, #setup_modifier_module
Methods inherited from UpdateIref
default_config, #do_modifications, #initialize
Constructor Details
This class inherits a constructor from Defmastership::Modifier::UpdateIref
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Defmastership::Modifier::ModifierCommon
Class Method Details
.replacement_methods ⇒ Array<Symbol>
Methods’s symbols will be called in sequence to perform the document modifications
17 18 19 |
# File 'lib/defmastership/modifier/update_iref_checksum.rb', line 17 def self.replacement_methods %i[replace_irefs] end |
Instance Method Details
#replace_irefs(_filename, line) ⇒ String
Replace the definition’s internal ref in the line if relevant
26 27 28 29 30 |
# File 'lib/defmastership/modifier/update_iref_checksum.rb', line 26 def replace_irefs(_filename, line) line.gsub(Core::DMRegexp::IREF_DEF) do Helper::IrefReplacementFormatterChecksum.new(Regexp.last_match, document).to_s end end |