module GitDiff
  class Diff
    attr_reader :files, :stats

    def initialize
      @files = []
    end

    def <<(string)
      if file = File.from_string(string)
        add_file file
      else
        append_to_current_file string
      end
    end

    def stats
      @stats ||= Stats.total(collector)
    end

    private

    def collector
      GitDiff::StatsCollector::Rollup.new(files)
    end

    attr_accessor :current_file

    def add_file(file)
      self.current_file = file
      files << current_file
    end

    def append_to_current_file(line)
      current_file << line
    end
  end
end
module GitDiff
  class Diff
    attr_reader :files

    def initialize
      @files = []
    end

    def <<(string)
      if file = File.from_string(string)
        add_file file
      else
        append_to_current_file string
      end
    end

    def stats
      @stats ||= Stats.total(collector)
    end

    private

    def collector
      GitDiff::StatsCollector::Rollup.new(files)
    end

    attr_accessor :current_file

    def add_file(file)
      self.current_file = file
      files << current_file
    end

    def append_to_current_file(line)
      current_file << line
    end
  end
end

Fix a warning that is for a redefined method
Fix a warning that is for a redefined method

For example:

```
$ RUBYOPT=-w ruby -rgit_diff -e ''
/home/pocke/.gem/ruby/2.4.0/gems/git_diff-0.3.0/lib/git_diff/diff.rb:17: warning: method redefined; discarding old stats
```
