Class: Rubycritic::SmellsAggregator

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

Instance Method Summary collapse

Constructor Details

#initialize(smell_adapters) ⇒ SmellsAggregator

Returns a new instance of SmellsAggregator.



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

def initialize(smell_adapters)
  @smell_adapters = smell_adapters
end

Instance Method Details

#smellsObject



8
9
10
# File 'lib/rubycritic/smells_aggregator.rb', line 8

def smells
  @smells ||= @smell_adapters.map(&:smells).flatten.sort
end

#smelly_pathnamesObject



12
13
14
# File 'lib/rubycritic/smells_aggregator.rb', line 12

def smelly_pathnames
  @smelly_pathnames ||= pathnames_to_files_with_smells
end