class GitDiffParser::Patch
- GitDiffParser::Patch
- Reference
- Object
Overview
Parsed patch
Defined in:
git_diff_parser/patch.crConstant Summary
-
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
Instance Method Summary
- #all_lines
- #body : String
- #body=(body : String)
-
#changed_line_numbers
@return [Array
] changed line numbers -
#changed_lines
@return [Array
] changed lines - #collapsible?
- #file : Int32 | String
- #file=(file : Int32 | String)
-
#find_line_by_line_number(line_number)
@param line_number [Integer] line number
-
#find_removed_line_by_line_number(line_number)
@param line_number [Integer] line number
-
#removed_line_numbers
@return [Array
] removed line numbers -
#removed_lines
@return [Array
] removed lines - #secure_hash : Int32 | String
- #secure_hash=(secure_hash : Int32 | String)
- #too_large?
Constructor Detail
Instance Method Detail
def find_line_by_line_number(line_number)
#
@param line_number [Integer] line number
@return [Integer, nil] patch position
def find_removed_line_by_line_number(line_number)
#
@param line_number [Integer] line number
@return [Integer, nil] patch position