Class: RShade::Filter::ExcludePathFilter

Inherits:
IncludePathFilter show all
Defined in:
lib/rshade/filter/exclude_path_filter.rb

Constant Summary collapse

NAME =
:exclude_paths

Instance Attribute Summary

Attributes inherited from IncludePathFilter

#paths

Instance Method Summary collapse

Methods inherited from IncludePathFilter

#config_call, #initialize

Methods inherited from AbstractFilter

#config, #config_call

Constructor Details

This class inherits a constructor from RShade::Filter::IncludePathFilter

Instance Method Details

#call(event) ⇒ Object



14
15
16
17
18
19
20
21
# File 'lib/rshade/filter/exclude_path_filter.rb', line 14

def call(event)
  event_path = event.path
  !paths.any? do |path|
    next str?(path, event_path) if path.is_a? String
    next regexp?(path, event_path) if path.is_a? Regexp
    false
  end
end

#nameObject



6
7
8
# File 'lib/rshade/filter/exclude_path_filter.rb', line 6

def name
  NAME
end

#priorityObject



10
11
12
# File 'lib/rshade/filter/exclude_path_filter.rb', line 10

def priority
  0
end