Sha256: 1b68f948c1ede460134f9e09fae5141a04b6a9359025ad2a9b19a327b14e4f9e
Contents?: true
Size: 409 Bytes
Versions: 8
Compression:
Stored size: 409 Bytes
Contents
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 end
Version data entries
8 entries across 8 versions & 1 rubygems