Class: Isolator::Ignorer::AdapterIgnore

Inherits:
Object
  • Object
show all
Defined in:
lib/isolator/ignorer.rb

Instance Method Summary collapse

Constructor Details

#initialize(adapter:, ignored_paths:, regex_string:) ⇒ AdapterIgnore

Returns a new instance of AdapterIgnore.



39
40
41
42
43
# File 'lib/isolator/ignorer.rb', line 39

def initialize(adapter:, ignored_paths:, regex_string:)
  self.adapter = adapter
  self.ignored_paths = ignored_paths
  self.regex_string = regex_string
end

Instance Method Details

#prepareObject



45
46
47
48
49
# File 'lib/isolator/ignorer.rb', line 45

def prepare
  return if ignores.blank?

  adapter.ignore_if { caller.any? { |row| regex =~ row } }
end