Class: SimpleCov::StringFilter

Inherits:
Filter
  • Object
show all
Defined in:
lib/simplecov/filter.rb

Instance Attribute Summary

Attributes inherited from Filter

#filter_argument

Instance Method Summary collapse

Methods inherited from Filter

build_filter, class_for_argument, #initialize, #passes?

Constructor Details

This class inherits a constructor from SimpleCov::Filter

Instance Method Details

#matches?(source_file) ⇒ Boolean

Returns true when the given source file’s filename matches the string configured when initializing this Filter with StringFilter.new(‘somestring’)

Returns:

  • (Boolean)


56
57
58
# File 'lib/simplecov/filter.rb', line 56

def matches?(source_file)
  source_file.project_filename.include?(filter_argument)
end