Class: RubyCritic::AnalysisSummary

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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(analysed_modules) ⇒ AnalysisSummary

Returns a new instance of AnalysisSummary.


9
10
11
# File 'lib/rubycritic/analysis_summary.rb', line 9

def initialize(analysed_modules)
  @analysed_modules = analysed_modules
end

Class Method Details

.generate(analysed_modules) ⇒ Object


5
6
7
# File 'lib/rubycritic/analysis_summary.rb', line 5

def self.generate(analysed_modules)
  new(analysed_modules).generate
end

Instance Method Details

#generateObject


13
14
15
16
17
# File 'lib/rubycritic/analysis_summary.rb', line 13

def generate
  %w(A B C D F).each_with_object({}) do |rating, summary|
    summary[rating] = generate_for(rating)
  end
end