disu.se

CopyClass

Namespace

Lookout::Diff::Operations

Ancestors
  1. Lookout::Diff::Operation

  2. Value

  3. Object

Slice that should be copied from the old sequence.

Constructor

This class inherits its constructor from Lookout::Diff::Operation.

Instance Methods

foldable?(contextInteger)Boolean#

Returns true if the slice of the old sequence is larger than context * 2 (#old#size > context * 2) so that it may be folded to context at both ends (#>>, #<<).

>>(contextInteger)self#

Folds from the beginning of the receiver, leaving context elements.

Note

Logically, the receiver should be #foldable? inside context, but this isn’t enforced.

<<(contextInteger)self#

Folds from the end of the receiver, leaving context elements.

Note

Logically, the receiver should be #foldable? inside context, but this isn’t enforced.

parity?Boolean#

Returns true if #old #== #new.