lib/csv2hash/structure_validator/min_columns.rb in csv2hash-0.6.0 vs lib/csv2hash/structure_validator/min_columns.rb in csv2hash-0.6.1
- old
+ new
@@ -1,18 +1,20 @@
-module Csv2hash::StructureValidator
- class MinColumns
+module Csv2hash
+ module StructureValidator
+ class MinColumns
- include Csv2hash::StructureValidator::Validator
+ include Validator
- def initialize min_size
- @min_size = min_size
- end
+ def initialize min_size
+ @min_size = min_size
+ end
- def validate_line line
- line.size < @min_size
- end
+ def validate_line line
+ line.size < @min_size
+ end
- def error_message line
- "Not enough columns (min. #{@min_size}) on line #{line}"
+ def error_message line
+ "Not enough columns (min. #{@min_size}) on line #{line}"
+ end
end
end
-end
\ No newline at end of file
+end