Class: Rbs::Merge::SmartMerger
- Inherits:
-
Ast::Merge::SmartMergerBase
- Object
- Ast::Merge::SmartMergerBase
- Rbs::Merge::SmartMerger
- Includes:
- Ast::Merge::CommentLayoutEmissionSupport
- Defined in:
- lib/rbs/merge/smart_merger.rb
Overview
Orchestrates the smart merge process for RBS type signature files. Uses FileAnalysis, FileAligner, ConflictResolver, and MergeResult to merge two RBS files intelligently.
SmartMerger provides flexible configuration for different merge scenarios. When matching class or module definitions are found in both files, the merger can perform recursive merging of their members.
Instance Attribute Summary collapse
-
#corruption_handling ⇒ Object
readonly
Returns the value of attribute corruption_handling.
Instance Method Summary collapse
-
#initialize(template_content, dest_content, signature_generator: nil, preference: :destination, add_template_only_nodes: false, remove_template_missing_nodes: false, corruption_handling: :heal, freeze_token: nil, match_refiner: nil, regions: nil, region_placeholder: nil, node_typing: nil, max_recursion_depth: Float::INFINITY, **options) ⇒ SmartMerger
constructor
Creates a new SmartMerger for intelligent RBS file merging.
Constructor Details
#initialize(template_content, dest_content, signature_generator: nil, preference: :destination, add_template_only_nodes: false, remove_template_missing_nodes: false, corruption_handling: :heal, freeze_token: nil, match_refiner: nil, regions: nil, region_placeholder: nil, node_typing: nil, max_recursion_depth: Float::INFINITY, **options) ⇒ SmartMerger
Creates a new SmartMerger for intelligent RBS file merging.
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 |
# File 'lib/rbs/merge/smart_merger.rb', line 87 def initialize( template_content, dest_content, signature_generator: nil, preference: :destination, add_template_only_nodes: false, remove_template_missing_nodes: false, corruption_handling: :heal, freeze_token: nil, match_refiner: nil, regions: nil, region_placeholder: nil, node_typing: nil, max_recursion_depth: Float::INFINITY, ** ) @max_recursion_depth = max_recursion_depth @remove_template_missing_nodes = remove_template_missing_nodes @corruption_handling = ::Ast::Merge::Healer.normalize_mode(corruption_handling) super( template_content, dest_content, signature_generator: signature_generator, preference: preference, add_template_only_nodes: add_template_only_nodes, remove_template_missing_nodes: remove_template_missing_nodes, freeze_token: freeze_token, match_refiner: match_refiner, regions: regions, region_placeholder: region_placeholder, node_typing: node_typing, ** ) end |
Instance Attribute Details
#corruption_handling ⇒ Object (readonly)
Returns the value of attribute corruption_handling.
46 47 48 |
# File 'lib/rbs/merge/smart_merger.rb', line 46 def corruption_handling @corruption_handling end |