Sha256: e621cfb20de16d516dfd3cac8a7f7e56647a1cb81cf3e9e091fad49331d5cc67
Contents?: true
Size: 819 Bytes
Versions: 4
Compression:
Stored size: 819 Bytes
Contents
module MetricFu::FlogReporter class ScannedMethod attr_accessor :name, :score, :operators def initialize(name, score, operators = []) @name = name @score = score.to_f @operators = operators end def to_html output = "<p><strong>#{name} (#{score})</strong></p>\n" output << "<table>\n" output << "<tr><th>Score</th><th>Operator</th></tr>\n" count = 0 operators.each do |operator| output << <<-EOF <tr class='#{Base.cycle("light", "dark", count)}'> <td class='score'>#{sprintf(SCORE_FORMAT, operator.score)}</td> <td class='score'>#{operator.operator}</td> </tr> EOF count += 1 end output << "</table>\n\n" end end end
Version data entries
4 entries across 4 versions & 2 rubygems