class MinitestBender::Sections::TimeRanking

Attributes

io[R]
results[R]
size[R]

Public Class Methods

new(io, size, results) click to toggle source
# File lib/minitest-bender/sections/time_ranking.rb, line 4
def initialize(io, size, results)
  @io = io
  @size = size
  @results = results
end

Public Instance Methods

print() click to toggle source

Private Instance Methods

formatted_label() click to toggle source
# File lib/minitest-bender/sections/time_ranking.rb, line 31
def formatted_label
  "  #{Colorizer.colorize('TIME RANKING', :time, :bold, :underline)}"
end
print_divider() click to toggle source
sorted_results() click to toggle source
# File lib/minitest-bender/sections/time_ranking.rb, line 39
def sorted_results
  results.sort_by { |r| -r.time }
end
sorted_results_to_show() click to toggle source
# File lib/minitest-bender/sections/time_ranking.rb, line 35
def sorted_results_to_show
  sorted_results.take(size)
end
trivial?() click to toggle source
# File lib/minitest-bender/sections/time_ranking.rb, line 27
def trivial?
  size < 1 || results.size < 2
end