Class Diff::LCS::ContextChange
In: lib/diff/lcs/change.rb
Parent: Diff::LCS::Change

Represents a contextual change. Contains the position and values of the elements in the old and the new sequenced enumerables as well as the action taken.

Methods

<=>   ==   from_a   inspect   new   simplify   to_a  

Attributes

new_element  [R]  Returns the new element being changed.
new_position  [R]  Returns the new position being changed.
old_element  [R]  Returns the old element being changed.
old_position  [R]  Returns the old position being changed.

Public Class methods

Simplifies a context change for use in some diff callbacks. ’<’ actions are converted to ’-’ and ’>’ actions are converted to ’+’.

Public Instance methods

[Validate]