Class: SimpleCov::RegexFilter
- Defined in:
- lib/simplecov/filter.rb,
sig/simplecov.rbs
Instance Attribute Summary
Attributes inherited from Filter
Instance Method Summary collapse
-
#matches?(source_file) ⇒ Boolean
Regexp#match?rather than=~so the predicate returns a real boolean:=~would return the match position, which trips rspec-mocks 4's stricter predicate-matcher type check. - #path_only? ⇒ Boolean
Methods inherited from Filter
build_filter, class_for_argument, #initialize
Constructor Details
This class inherits a constructor from SimpleCov::Filter
Instance Method Details
#matches?(source_file) ⇒ Boolean
Regexp#match? rather than =~ so the predicate returns a real boolean:
=~ would return the match position, which trips rspec-mocks 4's
stricter predicate-matcher type check.
103 104 105 |
# File 'lib/simplecov/filter.rb', line 103 def matches?(source_file) filter_argument.match?(source_file.project_filename) end |
#path_only? ⇒ Boolean
107 108 109 |
# File 'lib/simplecov/filter.rb', line 107 def path_only? true end |