class GitDiffParser::Patches

Overview

The array of patch

Included Modules

Defined in:

git_diff_parser/patches.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(patches : Array(GitDiffParser::Patch)) #

@return [Patches]


[View source]

Class Method Detail

def self.[](*ary) #

@return [Patches]


[View source]
def self.parse(contents) #

@param contents [String] git diff result

@return [Patches] parsed object


[View source]
def self.scrub_string(line) #

@return [String]


[View source]

Instance Method Detail

def each(&) #
Description copied from module Enumerable(GitDiffParser::Patch)

Must yield this collection's elements to the block.


[View source]
def files #

@return [Array] file path


[View source]
def find_patch_by_file(file) #

@param file [String] file path

@return [Patch, nil]


[View source]
def find_patch_by_secure_hash(secure_hash) #

@param secure_hash [String] target sha1 hash

@return [Patch, nil]


[View source]
def secure_hashes #

@return [Array] target sha1 hash


[View source]
def to_s #
Description copied from class Object

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.


[View source]