Sha256: be76b2308e454ede692ce4a8bc6854784067cf2ba1d7bc72a513f7419b99a581
Contents?: true
Size: 975 Bytes
Versions: 16
Compression:
Stored size: 975 Bytes
Contents
module Csvlint module ErrorCollector attr_reader :errors, :warnings, :info_messages # Creates a validation error def build_errors(type, category = nil, row = nil, column = nil, content = nil, constraints = {}) @errors << Csvlint::ErrorMessage.new(type, category, row, column, content, constraints) end # Creates a validation warning def build_warnings(type, category = nil, row = nil, column = nil, content = nil, constraints = {}) @warnings << Csvlint::ErrorMessage.new(type, category, row, column, content, constraints) end # Creates a validation information message def build_info_messages(type, category = nil, row = nil, column = nil, content = nil, constraints = {}) @info_messages << Csvlint::ErrorMessage.new(type, category, row, column, content, constraints) end def valid? errors.empty? end def reset @errors = [] @warnings = [] @info_messages = [] end end end
Version data entries
16 entries across 16 versions & 3 rubygems