Base filter class. Inherit from this to create custom filters, and overwrite the passes?(source_file) instance method
# A sample class that rejects all source files. class StupidFilter < SimpleCov::Filter
def passes?(source_file) false end
end
# File lib/simplecov/filter.rb, line 15 def initialize(filter_argument) @filter_argument = filter_argument end
# File lib/simplecov/filter.rb, line 19 def matches?(source_file) raise "The base filter class is not intended for direct use" end
# File lib/simplecov/filter.rb, line 23 def passes?(source_file) warn "DEPRECATION: SimpleCov::Filter#passes?(x) has been renamed to #matches?. Please update your custom filters accordingly!" matches?(source_file) end