class Pronto::Git::Patches

def each(&block)

def each(&block)
  @patches.each(&block)
end

def find_line(path, line)

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

def initialize(repo, commit, patches)

def initialize(repo, commit, patches)
  @repo = repo
  @commit = commit
  @patches = patches.map { |patch| Git::Patch.new(patch, repo) }
end

def reject(&block)

def reject(&block)
  Pronto::Git::Patches.new(repo, commit, @patches.reject(&block))
end