Object
Represents a simplistic (non-contextual) change. Represents the removal or addition of an element from either the old or the new sequenced enumerable.
Returns the action this Change represents. Can be '+' (adding?), '-' (deleting?), '=' (unchanged?), # or '!' (changed?). When created by Diff::LCS#diff or Diff::LCS#sdiff, it may also be '>' (finished_a?) or '<' (finished_b?).
# File lib/diff/lcs/change.rb, line 63 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
# File lib/diff/lcs/change.rb, line 57 def ==(other) (self.action == other.action) and (self.position == other.position) and (self.element == other.element) end
Creates a Change from an array produced by Change#to_a.
# File lib/diff/lcs/change.rb, line 77 def to_a [@action, @position, @element] end
Generated with the Darkfish Rdoc Generator 2.