Class: MetricFu::HotspotAnalyzedProblems

Inherits:
Object
  • Object
show all
Defined in:
lib/metric_fu/metrics/hotspots/analysis/analyzed_problems.rb

Instance Method Summary collapse

Constructor Details

#initialize(hotspot_rankings, analyzer_tables) ⇒ HotspotAnalyzedProblems

Returns a new instance of HotspotAnalyzedProblems.



5
6
7
8
# File 'lib/metric_fu/metrics/hotspots/analysis/analyzed_problems.rb', line 5

def initialize(hotspot_rankings, analyzer_tables)
  @hotspot_rankings = hotspot_rankings
  @analyzer_tables = analyzer_tables
end

Instance Method Details

#worst_itemsObject



10
11
12
13
14
15
16
# File 'lib/metric_fu/metrics/hotspots/analysis/analyzed_problems.rb', line 10

def worst_items
  worst_items = {}
  worst_items[:files]   = worst(@hotspot_rankings.worst_files,   :file)
  worst_items[:classes] = worst(@hotspot_rankings.worst_classes, :class)
  worst_items[:methods] = worst(@hotspot_rankings.worst_methods, :method)
  worst_items
end