class Covered::Wrapper
Wraps another coverage output.
def accept?(path)
@parameter path [String] The source path.
Whether the wrapped output accepts the given path.
def accept?(path) @output.accept?(path) end
def add(coverage)
Add coverage to the wrapped output.
def add(coverage) @output.add(coverage) end
def clear
def clear @output.clear end
def each(&block)
- Yield: - the path to the file, and the execution counts.
def each(&block) @output.each(&block) end
def expand_path(path)
@parameter path [String] The path to expand.
Expand a path using the wrapped output.
def expand_path(path) @output.expand_path(path) end
def finish
def finish @output.finish end
def initialize(output = Base.new)
Initialize the wrapper with the given output.
def initialize(output = Base.new) @output = output end
def mark(path, lineno, value)
@parameter lineno [Integer] The starting line number.
@parameter path [String] The source path.
Mark coverage on the wrapped output.
def mark(path, lineno, value) @output.mark(path, lineno, value) end
def relative_path(path)
@parameter path [String] The source path.
Convert a path using the wrapped output.
def relative_path(path) @output.relative_path(path) end
def start
def start @output.start end
def to_h
Convert all coverage data to a hash keyed by path.
def to_h to_enum(:each).collect{|coverage| [coverage.path, coverage]}.to_h end