123456789_123456789_123456789_123456789_123456789_

Class: SimpleCov::ArrayFilter

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, Filter
Instance Chain:
self, Filter
Inherits: SimpleCov::Filter
Defined in: lib/simplecov/filter.rb

Class Method Summary

Instance Attribute Summary

Filter - Inherited

Instance Method Summary

Filter - Inherited

Constructor Details

.new(filter_argument) ⇒ ArrayFilter

[ GitHub ]

  
# File 'lib/simplecov/filter.rb', line 78

def initialize(filter_argument)
  filter_objects = filter_argument.map do |arg|
    Filter.build_filter(arg)
  end

  super(filter_objects)
end

Instance Method Details

#matches?(source_files_list) ⇒ Boolean

Returns true if any of the filters in the array match the given source file. Configure this Filter like StringFilter.new([‘some/path’, /^some_regex/, Proc.new {|src_file| … }])

[ GitHub ]

  
# File 'lib/simplecov/filter.rb', line 88

def matches?(source_files_list)
  filter_argument.any? do |arg|
    arg.matches?(source_files_list)
  end
end