lib/csv2hash/structure_validator.rb in csv2hash-0.2.0 vs lib/csv2hash/structure_validator.rb in csv2hash-0.2.1

- old
+ new

@@ -4,17 +4,17 @@ def validate_structure! definition.structure_rules.each do |rule, options| begin rule_instance(rule, options).validate! data_source rescue => e - self.errors << e.message + self.errors << { y: nil, x: nil, message: e.message, key: nil } raise if exception_mode end end + end - def rule_instance rule, options - Csv2hash::StructureValidator.const_get(rule).new(options) - end + def rule_instance rule, options + Csv2hash::StructureValidator.const_get(rule).new(options) end module Validator def validate! source source.index { |line| validate_line line }.tap do |line| \ No newline at end of file