Class: RubyCritic::Generator::ConsoleReport

Inherits:
Object
  • Object
show all
Defined in:
lib/rubycritic/generators/console_report.rb

Instance Method Summary collapse

Constructor Details

#initialize(analysed_modules) ⇒ ConsoleReport


7
8
9
# File 'lib/rubycritic/generators/console_report.rb', line 7

def initialize(analysed_modules)
  @analysed_modules = analysed_modules
end

Instance Method Details

#generate_reportObject


11
12
13
14
15
16
# File 'lib/rubycritic/generators/console_report.rb', line 11

def generate_report
  reports = @analysed_modules.sort.map do |mod|
    Text::List.new(mod).render
  end
  puts reports.join("\n")
end