Method: Kronk::Diff#initialize

Defined in:
lib/kronk/diff.rb

#initialize(str1, str2, opts = {}) ⇒ Diff

Create a new Diff instance from two strings. Options supported are those of Kronk::Diff::Output, plus:

:char

String/Regex - The char to split on for comparisons.



42
43
44
45
46
47
48
49
# File 'lib/kronk/diff.rb', line 42

def initialize str1, str2, opts={}
  @str1       = str1
  @str2       = str2
  @diff_ary   = nil
  @char       = opts[:char] || /\r?\n/
  @meta       = []
  @output     = Output.new opts
end