MatchClass
- Namespace
- Ancestors
-
-
Value
-
Value::Comparable
-
Comparable
-
Matching pair of Slices of the sequences being “diffed”.
Constructor
initialize(oldSlice, newSlice)#⚙
Initializes a match between old and new.
Instance Methods
empty?Boolean#⚙
Returns true if the matching sequences are empty.
sizeInteger#⚙
Returns the number of matching elements.
+
(otherMatch)Match#⚙
Returns a new match encompassing the slices of the receiver and other.
- Note
-
Logically, the receiver should #touch? other, but this isn’t enforced.
touch?(otherMatch)Boolean#⚙
at(oldRange, newRange)Match#⚙
oldSlice#⚙
Returns the slice of the old sequence.
newSlice#⚙
Returns the slice of the new sequence.