module Csvlint::ErrorCollector

Attributes

errors[R]
info_messages[R]
warnings[R]

Public Instance Methods

build_errors(type, category = nil, row = nil, column = nil, content = nil, constraints = {}) click to toggle source

Creates a validation error

# File lib/csvlint/error_collector.rb, line 5
def build_errors(type, category = nil, row = nil, column = nil, content = nil, constraints = {})
  @errors << Csvlint::ErrorMessage.new(type, category, row, column, content, constraints)
end
build_info_messages(type, category = nil, row = nil, column = nil, content = nil, constraints = {}) click to toggle source

Creates a validation information message

# File lib/csvlint/error_collector.rb, line 13
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
build_warnings(type, category = nil, row = nil, column = nil, content = nil, constraints = {}) click to toggle source

Creates a validation warning

# File lib/csvlint/error_collector.rb, line 9
def build_warnings(type, category = nil, row = nil, column = nil, content = nil, constraints = {})
  @warnings << Csvlint::ErrorMessage.new(type, category, row, column, content, constraints)
end
reset() click to toggle source
# File lib/csvlint/error_collector.rb, line 21
def reset
  @errors = []
  @warnings = []
  @info_messages = []
end
valid?() click to toggle source
# File lib/csvlint/error_collector.rb, line 17
def valid?
  errors.empty?
end