Class: FileCharsetValidator
- Inherits:
-
Object
- Object
- FileCharsetValidator
- Defined in:
- lib/file_charset_validator.rb,
lib/file_charset_validator/version.rb
Constant Summary collapse
- VERSION =
"0.1.0"
Class Method Summary collapse
Class Method Details
.invalid_encoding_paths(paths, encoding) ⇒ Object
5 6 7 8 9 |
# File 'lib/file_charset_validator.rb', line 5 def self.invalid_encoding_paths(paths, encoding) paths.reject do |path| IO.binread(path.chomp).force_encoding(encoding).valid_encoding? end end |