Module: Csvlint::ErrorCollector
Constant Summary collapse
- MESSAGE_LEVELS =
[ :errors, :warnings, :info_messages ]
Instance Method Summary collapse
- #build_message(type, category, row, column, content, constraints) ⇒ Object
- #reset ⇒ Object
- #valid? ⇒ Boolean
Instance Method Details
#build_message(type, category, row, column, content, constraints) ⇒ Object
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/csvlint/error_collector.rb', line 5 def (type, category, row, column, content, constraints) Csvlint::ErrorMessage.new({ :type => type, :category => category, :row => row, :column => column, :content => content, :constraints => constraints }) end |
#reset ⇒ Object
36 37 38 39 40 |
# File 'lib/csvlint/error_collector.rb', line 36 def reset MESSAGE_LEVELS.each do |level| instance_variable_set("@#{level}", []) end end |
#valid? ⇒ Boolean
32 33 34 |
# File 'lib/csvlint/error_collector.rb', line 32 def valid? errors.empty? end |