Class | ANSI::Diff |
In: |
lib/ansi/diff.rb
|
Parent: | Object |
Diff produces colorized differences of two string or objects.
COLORS | = | [:red, :yellow, :magenta] | Rotation of colors for diff output. |
Highlights the differnce between two strings.
This class method is equivalent to calling:
ANSI::Diff.new(object1, object2).to_a
Setup new Diff object. If the objects given are not Strings and do not have `to_str` defined to coerce them to such, then their `inspect` methods are used to convert them to strings for comparison.
@param [Object] object1
First object to compare.
@param [Object] object2
Second object to compare.
@param [Hash] options
Options for contoller the way difference is shown. (Not yet used.)