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, #flush, #initialize, #relative_path, #to_h

Methods inherited from Base

#disable, #enable, #expand_path, #flush, #relative_path

Constructor Details

This class inherits a constructor from Covered::Wrapper

Instance Method Details

#accept?(path) ⇒ Boolean

Returns:

  • (Boolean)


108
109
110
# File 'lib/covered/wrapper.rb', line 108

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

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

Yields:

  • (Coverage)

    the path to the file, and the execution counts.



102
103
104
105
106
# File 'lib/covered/wrapper.rb', line 102

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

#mark(path, lineno, value) ⇒ Object



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

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

#match?(path) ⇒ Boolean

Returns:

  • (Boolean)


112
113
114
# File 'lib/covered/wrapper.rb', line 112

def match?(path)
	true
end