Class: Git::DiffFileNumstatInfo
- Inherits:
-
Data
- Object
- Data
- Git::DiffFileNumstatInfo
- Defined in:
- lib/git/diff_file_numstat_info.rb
Overview
Immutable value object representing stats for a single file from git numstat output
Instance Attribute Summary collapse
-
#deletions ⇒ Object
readonly
Returns the value of attribute deletions.
-
#insertions ⇒ Object
readonly
Returns the value of attribute insertions.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#src_path ⇒ Object
readonly
Returns the value of attribute src_path.
Instance Method Summary collapse
-
#renamed? ⇒ Boolean
Check if this file was renamed.
Instance Attribute Details
#deletions ⇒ Object (readonly)
Returns the value of attribute deletions
20 21 22 23 24 25 26 27 28 |
# File 'lib/git/diff_file_numstat_info.rb', line 20 DiffFileNumstatInfo = Data.define(:path, :src_path, :insertions, :deletions) do # Check if this file was renamed # # @return [Boolean] true if the file was renamed # def renamed? !src_path.nil? end end |
#insertions ⇒ Object (readonly)
Returns the value of attribute insertions
20 21 22 23 24 25 26 27 28 |
# File 'lib/git/diff_file_numstat_info.rb', line 20 DiffFileNumstatInfo = Data.define(:path, :src_path, :insertions, :deletions) do # Check if this file was renamed # # @return [Boolean] true if the file was renamed # def renamed? !src_path.nil? end end |
#path ⇒ Object (readonly)
Returns the value of attribute path
20 21 22 23 24 25 26 27 28 |
# File 'lib/git/diff_file_numstat_info.rb', line 20 DiffFileNumstatInfo = Data.define(:path, :src_path, :insertions, :deletions) do # Check if this file was renamed # # @return [Boolean] true if the file was renamed # def renamed? !src_path.nil? end end |
#src_path ⇒ Object (readonly)
Returns the value of attribute src_path
20 21 22 23 24 25 26 27 28 |
# File 'lib/git/diff_file_numstat_info.rb', line 20 DiffFileNumstatInfo = Data.define(:path, :src_path, :insertions, :deletions) do # Check if this file was renamed # # @return [Boolean] true if the file was renamed # def renamed? !src_path.nil? end end |
Instance Method Details
#renamed? ⇒ Boolean
Check if this file was renamed
25 26 27 |
# File 'lib/git/diff_file_numstat_info.rb', line 25 def renamed? !src_path.nil? end |