class Coverage::HTMLPrinter::Line

Attributes

count[RW]
lineno[RW]

Public Class Methods

new(lineno, line, count) click to toggle source
# File lib/coverage/html_printer.rb, line 222
def initialize(lineno, line, count)
  @lineno = lineno
  @line   = line
  @count  = count
end

Public Instance Methods

class_name() click to toggle source
# File lib/coverage/html_printer.rb, line 233
def class_name
  case
  when @count.nil?
    'not-code'
  when @count > 0
    'covered'
  when @count == 0
    'uncovered'
  else
    raise "must not happen! count=<#{@count}>"
  end
end
line() click to toggle source
# File lib/coverage/html_printer.rb, line 228
def line
  return "&#x200c;\n" if @line.chomp.size == 0
  h(@line).gsub(/ /, '&nbsp;')
end