class Rubycritic::SmellsAggregator
def initialize(smell_adapters)
def initialize(smell_adapters) @smell_adapters = smell_adapters end
def pathnames_to_files_with_smells
def pathnames_to_files_with_smells pathnames = Hash.new { |hash, key| hash[key] = [] } smells.each do |smell| smell.pathnames.each do |path| pathnames[path] << smell end end pathnames end
def smells
def smells @smells ||= @smell_adapters.map(&:smells).flatten.sort end
def smelly_pathnames
def smelly_pathnames @smelly_pathnames ||= pathnames_to_files_with_smells end