Class: RSpecTracer::ArrayFilter
- Defined in:
- lib/rspec_tracer/filter.rb
Instance Attribute Summary
Attributes inherited from Filter
Instance Method Summary collapse
-
#initialize(filters) ⇒ ArrayFilter
constructor
A new instance of ArrayFilter.
- #match?(source_file) ⇒ Boolean
Methods inherited from Filter
Constructor Details
#initialize(filters) ⇒ ArrayFilter
Returns a new instance of ArrayFilter.
38 39 40 41 42 43 44 |
# File 'lib/rspec_tracer/filter.rb', line 38 def initialize(filters) filter_list = filters.each_with_object([]) do |filter, list| list << Filter.register(filter) end super(filter_list) end |
Instance Method Details
#match?(source_file) ⇒ Boolean
46 47 48 |
# File 'lib/rspec_tracer/filter.rb', line 46 def match?(source_file) @filter.any? { |filter| filter.match?(source_file) } end |