Class: Hashira::Report::HotspotTable

Inherits:
Object
  • Object
show all
Defined in:
lib/hashira/report/hotspot_table.rb

Constant Summary collapse

TOP =
10
ROW =
"%-46s %5s %5s %6s %7s"

Instance Method Summary collapse

Constructor Details

#initialize(hotspots, io: $stdout) ⇒ HotspotTable

Returns a new instance of HotspotTable.



9
10
11
12
# File 'lib/hashira/report/hotspot_table.rb', line 9

def initialize(hotspots, io: $stdout)
  @hotspots = hotspots
  @io = io
end

Instance Method Details



14
15
16
17
18
19
20
# File 'lib/hashira/report/hotspot_table.rb', line 14

def print
  return if ranked.empty?

  heading
  rows
  legend
end