module Diff::LCS::ChangeTypeTests

Centralises the change test code in Diff::LCS::Change and Diff::LCS::ContextChange, since it's the same for both classes.

Public Instance Methods

adding?() click to toggle source
# File lib/diff/lcs/change.rb, line 24
def adding?
  @action == '+'
end
changed?() click to toggle source
# File lib/diff/lcs/change.rb, line 32
def changed?
  @changed == '!'
end
deleting?() click to toggle source
# File lib/diff/lcs/change.rb, line 20
def deleting?
  @action == '-'
end
finished_a?() click to toggle source
# File lib/diff/lcs/change.rb, line 36
def finished_a?
  @changed == '>'
end
finished_b?() click to toggle source
# File lib/diff/lcs/change.rb, line 40
def finished_b?
  @changed == '<'
end
unchanged?() click to toggle source
# File lib/diff/lcs/change.rb, line 28
def unchanged?
  @action == '='
end