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

#add, #clear, #expand_path, #finish, #initialize, #relative_path, #start, #to_h

Methods inherited from Base

#add, #clear, #expand_path, #finish, #relative_path, #start

Constructor Details

This class inherits a constructor from Covered::Wrapper

Instance Method Details

#accept?(path) ⇒ Boolean

Returns:

  • (Boolean)


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

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

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

Yields:

  • (Coverage)

    the path to the file, and the execution counts.



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

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

#mark(path, lineno, value) ⇒ Object



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

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

#match?(path) ⇒ Boolean

Returns:

  • (Boolean)


110
111
112
# File 'lib/covered/wrapper.rb', line 110

def match?(path)
	true
end