Class: GitHooks::TrailingWhitespaceValidator
- Inherits:
-
Object
- Object
- GitHooks::TrailingWhitespaceValidator
- Defined in:
- lib/git_hooks/trailing_whitespace_validator.rb
Instance Method Summary collapse
Instance Method Details
#errors?(files) ⇒ Boolean
3 4 5 6 7 8 9 10 |
# File 'lib/git_hooks/trailing_whitespace_validator.rb', line 3 def errors?(files) files .map { |file| File.open(file) } .map(&:read) .grep(/ +$/) .compact .any? end |