class Covered::Only

Only includes coverage for paths matching a pattern.

def initialize(output, pattern)

@parameter pattern [Object] The pattern matched with `===`.
@parameter output [Covered::Base] The output to wrap.
Initialize an only filter for the given pattern.
def initialize(output, pattern)
	super(output)
	
	@pattern = pattern
end

def match?(path)

@returns [Boolean] Whether the path matches the pattern.
@parameter path [String] The source path.
Whether the given path matches the only pattern.
def match?(path)
	@pattern === path
end