Sha256: 27aeafc1a7bb705f6e3c3ba56c94b32c9d8a252ceed4127d2ffbbfc8dd2d6103
Contents?: true
Size: 827 Bytes
Versions: 3
Compression:
Stored size: 827 Bytes
Contents
module Metricks::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
3 entries across 3 versions & 1 rubygems