class Filter
Filters coverage before forwarding it to another output.
Definitions
def mark(path, lineno, value)
Mark coverage if the path is accepted by this filter.
Signature
-
parameter
pathString The source path.
-
parameter
linenoInteger The starting line number.
-
parameter
valueInteger | Array(Integer) The execution count or counts to add.
Implementation
def mark(path, lineno, value)
@output.mark(path, lineno, value) if accept?(path)
end
def each(&block)
Implementation
def each(&block)
@output.each do |coverage|
yield coverage if accept?(coverage.path)
end
end
def accept?(path)
Whether the given path is accepted by this filter and its output.
Signature
-
parameter
pathString The source path.
-
returns
Boolean Whether this filter and the wrapped output accept the path.
Implementation
def accept?(path)
match?(path) and super
end
def match?(path)
Whether the given path matches this filter.
Signature
-
parameter
pathString The source path.
-
returns
Boolean Whether this filter matches the path.
Implementation
def match?(path)
true
end