Class: FiletypeValidation::CsvValidator
- Inherits:
-
BaseValidator
- Object
- BaseValidator
- FiletypeValidation::CsvValidator
- Defined in:
- lib/filetype_validation/csv_validator.rb
Overview
aka Comma Separated Valuedator <— hahahahhahah
Constant Summary collapse
- MAX_LINES =
25
- HEADERS =
true
Instance Attribute Summary
Attributes inherited from BaseValidator
Instance Method Summary collapse
-
#valid? ⇒ Boolean
Evaluates whether the file is a csv.
Methods inherited from BaseValidator
Constructor Details
This class inherits a constructor from FiletypeValidation::BaseValidator
Instance Method Details
#valid? ⇒ Boolean
Evaluates whether the file is a csv
13 14 15 16 17 |
# File 'lib/filetype_validation/csv_validator.rb', line 13 def valid? csv_extension? && FiletypeValidation.plaintext?(file, ) && parse_csv? end |