Class: Reek::Report

Inherits:
Object show all
Defined in:
lib/reek/adapters/report.rb

Instance Method Summary collapse

Constructor Details

#initialize(sniffers) ⇒ Report

Returns a new instance of Report.



76
77
78
# File 'lib/reek/adapters/report.rb', line 76

def initialize(sniffers)
  @partials = Array(sniffers).map {|sn| ReportSection.new(sn)}
end

Instance Method Details

#full_reportObject

SMELL: Shotgun Surgery This method and the next will have to be repeated for every new kind of report.



83
84
85
# File 'lib/reek/adapters/report.rb', line 83

def full_report
  @partials.map { |rpt| rpt.full_report }.join
end

#quiet_reportObject



87
88
89
# File 'lib/reek/adapters/report.rb', line 87

def quiet_report
  @partials.map { |rpt| rpt.quiet_report }.join
end