Class: Covered::Filter

Inherits:
Wrapper show all
Defined in:
lib/covered/files.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

Constructor Details

This class inherits a constructor from Covered::Wrapper

Instance Method Details

#accept?(path) ⇒ Boolean

Returns:

  • (Boolean)


92
93
94
# File 'lib/covered/files.rb', line 92

def accept?(path)
	true
end

#each(&block) ⇒ Object



100
101
102
103
104
105
106
107
108
# File 'lib/covered/files.rb', line 100

def each(&block)
	super do |coverage|
		if accept?(coverage.path)
			yield coverage
		else
			puts "Skipping #{coverage.path} #{self.class}"
		end
	end
end

#mark(path, *args) ⇒ Object



96
97
98
# File 'lib/covered/files.rb', line 96

def mark(path, *args)
	super if accept?(path)
end