GitDiffParser::Patch
Inherits Reference < Object
Parsed patch
Constants
DIFF_COLLAPSE_LIMIT = 10240
The maximum size before a diff is collapsed.
DIFF_SIZE_LIMIT = 102400
The maximum size of a diff to display.
MODIFIED_LINE = /^\+(?!\+|\+)/
NOT_MOD_REM_LINE = /^[^-+]/
NOT_REMOVED_LINE = /^[^-]/
RANGE_ADD_INFORMATION_LINE = /^@@ .+\+(?<line_number>\d+)/
RANGE_DEL_INFORMATION_LINE = /^@@ \-(?<line_number>\d+)/
REMOVED_LINE = /^[-]/
Constructors
new(body, options = {} of String => String | Int32)
SourceInstance methods
all_lines
Sourcebody
Sourcebody=(body : String)
Sourcecollapsible?
Sourcefile
Sourcefile=(file : Int32 | String)
Sourcefind_line_by_line_number(line_number)
@param line_number [Integer] line number
@return [Integer, nil] patch position
find_removed_line_by_line_number(line_number)
@param line_number [Integer] line number
@return [Integer, nil] patch position
secure_hash
Sourcesecure_hash=(secure_hash : Int32 | String)
Sourcetoo_large?
Source