Module: GitDiffParser

Defined in:
lib/git_diff_parser.rb,
lib/git_diff_parser/line.rb,
lib/git_diff_parser/patch.rb,
lib/git_diff_parser/patches.rb,
lib/git_diff_parser/version.rb,
lib/git_diff_parser/diff_parser.rb

Overview

Parse ‘git diff` into patches and lines

Defined Under Namespace

Classes: DiffParser, Line, Patch, Patches

Constant Summary collapse

VERSION =
'4.0.0'.freeze

Class Method Summary collapse

Class Method Details

.parse(contents) ⇒ Patches<Patch>

Returns parsed patches and lines.

Parameters:

  • contents (String)

    ‘git diff` result.

Returns:



12
13
14
# File 'lib/git_diff_parser.rb', line 12

def self.parse(contents)
  Patches.parse(contents)
end