Class: ActiveRecord::DataIntegrity::Collector
- Inherits:
-
Object
- Object
- ActiveRecord::DataIntegrity::Collector
- Defined in:
- lib/active_record/data_integrity/collector.rb
Overview
collects result info for rendering
Class Method Summary collapse
Class Method Details
.log(cop, message) ⇒ Object
8 9 10 |
# File 'lib/active_record/data_integrity/collector.rb', line 8 def log(cop, ) data.push(cop: cop, message: ) end |
.progress(_cop, char) ⇒ Object
12 13 14 |
# File 'lib/active_record/data_integrity/collector.rb', line 12 def progress(_cop, char) print char end |
.render ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'lib/active_record/data_integrity/collector.rb', line 16 def render group_data_by_cop_name.each do |cop_name, items| items.each do |item| puts "#{Rainbow(cop_name).red}:"\ " #{Rainbow(item[:cop].model.name).yellow}"\ " #{item[:message]}" end end end |