disu.se

MatchClass

Namespace

Lookout::Diff

Ancestors
  1. Value

  2. Value::Comparable

  3. Comparable

  4. Object

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#

Returns true if #old and #new #touch? those of other.

at(oldRange, newRange)Match#

Returns a new match with #old and #new #at old and new.

oldSlice#

Returns the slice of the old sequence.

newSlice#

Returns the slice of the new sequence.