lib/csv2hash/structure_validator/max_columns.rb in csv2hash-0.6.0 vs lib/csv2hash/structure_validator/max_columns.rb in csv2hash-0.6.1

- old
+ new

@@ -1,18 +1,20 @@ -module Csv2hash::StructureValidator - class MaxColumns +module Csv2hash + module StructureValidator + class MaxColumns - include Csv2hash::StructureValidator::Validator + include Validator - def initialize max_size - @max_size = max_size - end + def initialize max_size + @max_size = max_size + end - def validate_line line - line.size > @max_size - end + def validate_line line + line.size > @max_size + end - def error_message line - "Too many columns (max. #{@max_size}) on line #{line}" + def error_message line + "Too many columns (max. #{@max_size}) on line #{line}" + end end end -end \ No newline at end of file +end