class IMissValidator::Reporter

Public Class Methods

print_with_indent(level, str = "") click to toggle source
report(results = []) click to toggle source
# File lib/i_miss_validator/reporter.rb, line 20
def self.report(results = [])
  results.each do |result|
    next if result[:problems].keys.size == 0

    print_with_indent(1, "Model".red + ": #{result[:model]}")

    result[:problems].each do |column, problems|
      print_with_indent(2, "Column".pink + ": #{column}")

      problems.each do |problem|
        print_with_indent(3, "Missing".yellow + ": #{problem[:message]}")
      end
    end
  end
end