class Diff::LCS::Change

addition of an element from either the old or the new sequenced enumerable.
Represents a simplistic (non-contextual) change. Represents the removal or

def self.from_a(arr)

def self.from_a(arr)
  Diff::LCS::Change.new(arr[0], arr[1], arr[2])
end

def <=>(other)

def <=>(other)
  r = self.action <=> other.action
  r = self.position <=> other.position if r.zero?
  r = self.element <=> other.element if r.zero?
  r
end

def ==(other)

def ==(other)
  (self.action == other.action) and
  (self.position == other.position) and
  (self.element == other.element)
end

def initialize(action, position, element)

def initialize(action, position, element)
  @action = action
  @position = position
  @element = element
end

def to_a

Creates a Change from an array produced by Change#to_a.
def to_a
  [@action, @position, @element]
end