class

GitDiffParser::Patches

Inherits Enumerable < Reference < Object

The array of patch

Constructors

new(patches : Array(GitDiffParser::Patch))

@return [Patches<Patch>]

Source

Class methods

[](*ary)

@return [Patches<Patch>]

Source
parse(contents)

@param contents [String] git diff result

@return [Patches<Patch>] parsed object

Source
scrub_string(line)

@return [String]

Source

Instance methods

each

Must yield this collection's elements to the block.

Source
files

@return [Array<String>] file path

Source
find_patch_by_file(file)

@param file [String] file path

@return [Patch, nil]

Source
find_patch_by_secure_hash(secure_hash)

@param secure_hash [String] target sha1 hash

@return [Patch, nil]

Source
secure_hashes

@return [Array<String>] target sha1 hash

Source
to_s

Returns a nicely readable and concise string representation of this object, typically intended for users.

This method should usually not be overridden. It delegates to #to_s(IO) which can be overridden for custom implementations.

Also see #inspect.

Source