Module: Canon::TreeDiff
- Defined in:
- lib/canon/tree_diff.rb,
lib/canon/tree_diff/core.rb,
lib/canon/tree_diff/adapters.rb,
lib/canon/tree_diff/matchers.rb,
lib/canon/tree_diff/operations.rb,
lib/canon/tree_diff/core/matching.rb,
lib/canon/tree_diff/core/tree_node.rb,
lib/canon/tree_diff/core/node_weight.rb,
lib/canon/tree_diff/core/node_signature.rb,
lib/canon/tree_diff/operation_converter.rb,
lib/canon/tree_diff/adapters/xml_adapter.rb,
lib/canon/tree_diff/operations/operation.rb,
lib/canon/tree_diff/tree_diff_integrator.rb,
lib/canon/tree_diff/adapters/html_adapter.rb,
lib/canon/tree_diff/adapters/json_adapter.rb,
lib/canon/tree_diff/adapters/yaml_adapter.rb,
lib/canon/tree_diff/matchers/hash_matcher.rb,
lib/canon/tree_diff/core/xml_entity_decoder.rb,
lib/canon/tree_diff/core/attribute_comparator.rb,
lib/canon/tree_diff/matchers/universal_matcher.rb,
lib/canon/tree_diff/matchers/similarity_matcher.rb,
lib/canon/tree_diff/operation_converter_helpers.rb,
lib/canon/tree_diff/operations/operation_detector.rb,
lib/canon/tree_diff/matchers/structural_propagator.rb,
lib/canon/tree_diff/operation_converter_helpers/post_processor.rb,
lib/canon/tree_diff/operation_converter_helpers/reason_builder.rb,
lib/canon/tree_diff/operation_converter_helpers/metadata_enricher.rb,
lib/canon/tree_diff/operation_converter_helpers/update_change_handler.rb
Overview
Semantic tree-diff algorithm — distinct from the DOM positional diff in Comparison.
This module computes signature-based tree matches and produces INSERT/DELETE/UPDATE/MOVE operations. Sub-namespaces:
-
Core — TreeNode, Matching, NodeSignature, NodeWeight, AttributeComparator, XmlEntityDecoder
-
Matchers — HashMatcher, SimilarityMatcher, StructuralPropagator, UniversalMatcher
-
Operations — Operation, OperationDetector
-
Adapters — format-specific tree adapters (XML, JSON, HTML, YAML)
-
OperationConverterHelpers — MetadataEnricher, ReasonBuilder, PostProcessor, UpdateChangeHandler
Top-level entry points: OperationConverter and TreeDiffIntegrator.
All children are autoloaded — never ‘require_relative` them.
Defined Under Namespace
Modules: Adapters, Core, Matchers, OperationConverterHelpers, Operations Classes: OperationConverter, TreeDiffIntegrator