Module: RubyCritic::Reporter

Defined in:
lib/rubycritic/reporter.rb

Class Method Summary collapse

Class Method Details

.generate_report(analysed_modules) ⇒ Object


4
5
6
# File 'lib/rubycritic/reporter.rb', line 4

def self.generate_report(analysed_modules)
  report_generator_class.new(analysed_modules).generate_report
end

.report_generator_classObject


8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/rubycritic/reporter.rb', line 8

def self.report_generator_class
  case Config.format
  when :json
    require 'rubycritic/generators/json_report'
    Generator::JsonReport
  when :console
    require 'rubycritic/generators/console_report'
    Generator::ConsoleReport
  else
    require 'rubycritic/generators/html_report'
    Generator::HtmlReport
  end
end