Class: SuperDiff::Basic::OperationTreeBuilders::Array::LcsCallbacks
- Inherits:
-
Object
- Object
- SuperDiff::Basic::OperationTreeBuilders::Array::LcsCallbacks
- Defined in:
- lib/super_diff/basic/operation_tree_builders/array.rb
Instance Method Summary collapse
- #change(event) ⇒ Object
- #discard_a(event) ⇒ Object
- #discard_b(event) ⇒ Object
- #match(event) ⇒ Object
Instance Method Details
#change(event) ⇒ Object
52 53 54 55 56 57 58 59 60 61 |
# File 'lib/super_diff/basic/operation_tree_builders/array.rb', line 52 def change(event) children = compare.call(event.old_element, event.new_element) if children add_change_operation(event, children) else add_delete_operation(event) add_insert_operation(event) end end |
#discard_a(event) ⇒ Object
44 45 46 |
# File 'lib/super_diff/basic/operation_tree_builders/array.rb', line 44 def discard_a(event) add_delete_operation(event) end |
#discard_b(event) ⇒ Object
48 49 50 |
# File 'lib/super_diff/basic/operation_tree_builders/array.rb', line 48 def discard_b(event) add_insert_operation(event) end |
#match(event) ⇒ Object
40 41 42 |
# File 'lib/super_diff/basic/operation_tree_builders/array.rb', line 40 def match(event) add_noop_operation(event) end |