Method: Clash::Diff#diff_files

Defined in:
lib/clash/diff.rb

#diff_files(a, b) ⇒ Object



25
26
27
28
29
30
31
32
33
34
35
# File 'lib/clash/diff.rb', line 25

def diff_files(a, b)
  if exists(a) && exists(b)
    diffy = Diffy::Diff.new(a,b, :source => 'files', :context => @context)
    file_diff = diffy.to_a

    if !file_diff.empty?
      file_diff = format_diff(file_diff)
      @diffs[yellowit("\nCompared #{a} to #{b}:\n")] = file_diff 
    end
  end
end