Class: Diff::LCS::DefaultCallbacks

Inherits:
Object
  • Object
show all
Defined in:
lib/diff/lcs/callbacks.rb

Overview

This callback object implements the default set of callback events, which only returns the event itself.

“‘ruby Diff::LCS.lcs(seq1, seq2, Diff::LCS::DefaultCallbacks) “`

Class Method Summary collapse

Class Method Details

.change(event) ⇒ Object

Called when both the old and new values have changed.



22
# File 'lib/diff/lcs/callbacks.rb', line 22

def self.change(event) = event

.discard_a(event) ⇒ Object

Called when the old value is discarded in favour of the new value.



16
# File 'lib/diff/lcs/callbacks.rb', line 16

def self.discard_a(event) = event

.discard_b(event) ⇒ Object

Called when the new value is discarded in favour of the old value.



19
# File 'lib/diff/lcs/callbacks.rb', line 19

def self.discard_b(event) = event

.match(event) ⇒ Object

Called when two items match.



13
# File 'lib/diff/lcs/callbacks.rb', line 13

def self.match(event) = event

.newObject



24
# File 'lib/diff/lcs/callbacks.rb', line 24

def self.new = self