class Pronto::Git::Patches
Attributes
Public Class Methods
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
Source
# File lib/pronto/git/patches.rb, line 14 def each(&block) @patches.each(&block) end
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
Source
# File lib/pronto/git/patches.rb, line 18 def reject(&block) Pronto::Git::Patches.new(repo, commit, @patches.reject(&block)) end