Method: Slather::CoverageFile#coverage_for_line
- Defined in:
- lib/slather/coverage_file.rb
#coverage_for_line(line) ⇒ Object
96 97 98 99 100 101 102 103 104 105 106 107 108 |
# File 'lib/slather/coverage_file.rb', line 96 def coverage_for_line(line) line =~ /^(.+?):/ match = $1.strip case match when /[0-9]+/ match.to_i when /#+/ 0 when "-" nil end end |