Class: FseventsToVm::PathFilter

Inherits:
Object
  • Object
show all
Defined in:
lib/fsevents_to_vm/path_filter.rb

Instance Method Summary collapse

Constructor Details

#initializePathFilter

Returns a new instance of PathFilter.


3
4
5
# File 'lib/fsevents_to_vm/path_filter.rb', line 3

def initialize
  @filter = %r{#{ENV['HOME']}/(Library|\.)|/\.(git|hg|svn)/}
end

Instance Method Details

#ignore?(event) ⇒ Boolean

Returns:

  • (Boolean)

7
8
9
# File 'lib/fsevents_to_vm/path_filter.rb', line 7

def ignore?(event)
  !!@filter.match(event.path)
end