Class: MergeConflict
- Inherits:
-
Object
- Object
- MergeConflict
- Defined in:
- lib/pre-commit/checks/merge_conflict.rb
Instance Attribute Summary collapse
-
#staged_files ⇒ Object
Returns the value of attribute staged_files.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#staged_files ⇒ Object
Returns the value of attribute staged_files.
3 4 5 |
# File 'lib/pre-commit/checks/merge_conflict.rb', line 3 def staged_files @staged_files end |
Class Method Details
.call ⇒ Object
5 6 7 8 9 |
# File 'lib/pre-commit/checks/merge_conflict.rb', line 5 def self.call check = new check.staged_files = Utils.staged_files('.') check.run end |
Instance Method Details
#run ⇒ Object
11 12 13 |
# File 'lib/pre-commit/checks/merge_conflict.rb', line 11 def run !system("grep '<<<<<<<' #{staged_files}") end |