Class: Diff::LCS::DefaultCallbacks
- Inherits:
-
Object
- Object
- Diff::LCS::DefaultCallbacks
- Defined in:
- lib/watobo/external/diff/lcs/callbacks.rb
Overview
This callback object implements the default set of callback events, which only returns the event itself. Note that #finished_a and #finished_b are not implemented – I haven’t yet figured out where they would be useful.
Note that this is intended to be called as is, e.g.,
Diff::LCS.LCS(seq1, seq2, Diff::LCS::DefaultCallbacks)
Class Method Summary collapse
-
.change(event) ⇒ Object
Called when both the old and new values have changed.
-
.discard_a(event) ⇒ Object
Called when the old value is discarded in favour of the new value.
-
.discard_b(event) ⇒ Object
Called when the new value is discarded in favour of the old value.
-
.match(event) ⇒ Object
Called when two items match.
Class Method Details
.change(event) ⇒ Object
Called when both the old and new values have changed.
63 64 65 |
# File 'lib/watobo/external/diff/lcs/callbacks.rb', line 63 def change(event) event end |
.discard_a(event) ⇒ Object
Called when the old value is discarded in favour of the new value.
55 56 57 |
# File 'lib/watobo/external/diff/lcs/callbacks.rb', line 55 def discard_a(event) event end |
.discard_b(event) ⇒ Object
Called when the new value is discarded in favour of the old value.
59 60 61 |
# File 'lib/watobo/external/diff/lcs/callbacks.rb', line 59 def discard_b(event) event end |
.match(event) ⇒ Object
Called when two items match.
51 52 53 |
# File 'lib/watobo/external/diff/lcs/callbacks.rb', line 51 def match(event) event end |