Class: RSpecTracer::ArrayFilter Private

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

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Internal ArrayFilter — see RSpecTracer for the user-facing surface.

Instance Method Summary collapse

Constructor Details

#initialize(filters) ⇒ ArrayFilter

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Internal method on the tracer pipeline.



59
60
61
62
63
64
65
# File 'lib/rspec_tracer/filter.rb', line 59

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

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Internal method on the tracer pipeline.

Returns:

  • (Boolean)


69
70
71
# File 'lib/rspec_tracer/filter.rb', line 69

def match?(source_file)
  @filter.any? { |filter| filter.match?(source_file) }
end