Sha256: 8dda973a29e789f80ecbde6ef548a94a8803e2e40676e4511e0e5e481e65f1c1
Contents?: true
Size: 664 Bytes
Versions: 2
Compression:
Stored size: 664 Bytes
Contents
def initialize(context) super require_relative '../../lib/covered' end # Debug the coverage of a file. Show which lines should be executable. # # @parameter paths [Array(String)] The paths to parse. # @parameter execute [Boolean] Whether to execute the code. def parse(paths: [], execute: false) files = output = Covered::Files.new output = Covered::Source.new(output) paths.each do |path| output.mark(path, 0, 0) end if execute capture = Covered::Capture.new(output) capture.enable paths.each do |path| load path end capture.disable files.paths = files.paths.slice(*paths) end Covered::Summary.new.call(output, $stderr) end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
covered-0.16.7 | bake/covered/debug.rb |
covered-0.16.6 | bake/covered/debug.rb |