lib/gitrb/diff.rb in gitrb-0.0.8 vs lib/gitrb/diff.rb in gitrb-0.0.9

- old
+ new

@@ -1,21 +1,3 @@ module Gitrb - - class Diff - attr_reader :from, :to, :patch, :deletions, :insertions - - def initialize(from, to, patch) - @from = from - @to = to - @patch = patch - @deletions = @insertions = 0 - @patch.split("\n").each do |line| - if line[0..0] == '-' - @deletions += 1 - elsif line[0..0] == '+' - @insertions += 1 - end - end - end - end - + Diff = Struct.new(:from, :to, :patch) end