Class: Covered::Filter

Inherits:
Wrapper show all
Defined in:
lib/covered/wrapper.rb

Direct Known Subclasses

Only, Root, Skip

Instance Attribute Summary

Attributes inherited from Wrapper

#output

Instance Method Summary collapse

Methods inherited from Wrapper

#disable, #enable, #expand_path, #initialize, #relative_path, #to_h

Methods inherited from Base

#disable, #enable, #expand_path, #relative_path

Constructor Details

This class inherits a constructor from Covered::Wrapper

Instance Method Details

#accept?(path) ⇒ Boolean

Returns:

  • (Boolean)

101
102
103
# File 'lib/covered/wrapper.rb', line 101

def accept?(path)
	match?(path) and super
end

#each {|Coverage| ... } ⇒ Object

Yields:

  • (Coverage)

    the path to the file, and the execution counts.


95
96
97
98
99
# File 'lib/covered/wrapper.rb', line 95

def each(&block)
	@output.each do |coverage|
		yield coverage if accept?(coverage.path)
	end
end

#mark(path, lineno, value) ⇒ Object


90
91
92
# File 'lib/covered/wrapper.rb', line 90

def mark(path, lineno, value)
	@output.mark(path, lineno, value) if accept?(path)
end

#match?(path) ⇒ Boolean

Returns:

  • (Boolean)

105
106
107
# File 'lib/covered/wrapper.rb', line 105

def match?(path)
	true
end