Sha256: 83bdd79b465378c5cc372ba8c8d340dc301bb61e9e8894ada65ffcd035cad301
Contents?: true
Size: 618 Bytes
Versions: 10
Compression:
Stored size: 618 Bytes
Contents
module Pronto module Git class Patches include Enumerable attr_reader :commit, :repo def initialize(repo, commit, patches) @repo = repo @commit = commit @patches = patches.map { |patch| Git::Patch.new(patch, repo) } end def each(&block) @patches.each(&block) end def reject!(&block) @patches.reject!(&block) end def find_line(path, line) patch = find { |p| p.new_file_full_path == path } lines = patch ? patch.lines : [] lines.find { |l| l.new_lineno == line } end end end end
Version data entries
10 entries across 10 versions & 1 rubygems