Sha256: 848c545623d9707b2f5e1e9a0f17cc08db82e7e6f0d224fc0758084b77637108
Contents?: true
Size: 827 Bytes
Versions: 11
Compression:
Stored size: 827 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
11 entries across 11 versions & 4 rubygems