class Pronto::Git::Patches

Attributes

commit[R]
repo[R]

Public Class Methods

new(repo, commit, patches) click to toggle source
# File lib/pronto/git/patches.rb, line 8
def initialize(repo, commit, patches)
  @repo = repo
  @commit = commit
  @patches = patches.map { |patch| Git::Patch.new(patch, repo) }
end

Public Instance Methods

each(&block) click to toggle source
# File lib/pronto/git/patches.rb, line 14
def each(&block)
  @patches.each(&block)
end
find_line(path, line) click to toggle source
# File lib/pronto/git/patches.rb, line 22
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
reject(&block) click to toggle source
# File lib/pronto/git/patches.rb, line 18
def reject(&block)
  Pronto::Git::Patches.new(repo, commit, @patches.reject(&block))
end