Class: Toml::Merge::ConflictResolver
- Inherits:
-
Ast::Merge::ConflictResolverBase
- Object
- Ast::Merge::ConflictResolverBase
- Toml::Merge::ConflictResolver
- Includes:
- Ast::Merge::CommentLayoutEmissionSupport, Ast::Merge::StructuredEmitterProvenanceSupport, Ast::Merge::TrailingGroups::DestIterate
- Defined in:
- lib/toml/merge/conflict_resolver.rb
Overview
Resolves conflicts between template and destination TOML content using structural signatures and configurable preferences.
Defined Under Namespace
Classes: MissingSharedInlineRegionError
Instance Attribute Summary collapse
-
#corruption_handling ⇒ Object
readonly
Returns the value of attribute corruption_handling.
Instance Method Summary collapse
-
#initialize(template_analysis, dest_analysis, preference: :destination, add_template_only_nodes: false, remove_template_missing_nodes: false, resolution_mode: :eager, corruption_handling: :heal, match_refiner: nil, **options) ⇒ ConflictResolver
constructor
Creates a new ConflictResolver.
Constructor Details
#initialize(template_analysis, dest_analysis, preference: :destination, add_template_only_nodes: false, remove_template_missing_nodes: false, resolution_mode: :eager, corruption_handling: :heal, match_refiner: nil, **options) ⇒ ConflictResolver
Creates a new ConflictResolver
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/toml/merge/conflict_resolver.rb', line 31 def initialize(template_analysis, dest_analysis, preference: :destination, add_template_only_nodes: false, remove_template_missing_nodes: false, resolution_mode: :eager, corruption_handling: :heal, match_refiner: nil, **) super( strategy: :batch, preference: preference, template_analysis: template_analysis, dest_analysis: dest_analysis, add_template_only_nodes: add_template_only_nodes, remove_template_missing_nodes: remove_template_missing_nodes, match_refiner: match_refiner, ** ) @resolution_mode = resolution_mode @corruption_handling = ::Ast::Merge::Healer.normalize_mode(corruption_handling) @emitter = Emitter.new end |
Instance Attribute Details
#corruption_handling ⇒ Object (readonly)
Returns the value of attribute corruption_handling.
18 19 20 |
# File 'lib/toml/merge/conflict_resolver.rb', line 18 def corruption_handling @corruption_handling end |