module Wunderbar::Listen

Constants

EXCLUDE

Public Class Methods

exclude(*files) click to toggle source

add a path to the exclude list

# File lib/wunderbar/listen.rb, line 28
def self.exclude(*files)
  files.each do |file|
    file = File.realpath(file)
    EXCLUDE << file unless EXCLUDE.include? file
  end
end
exclude?(files) click to toggle source

check to see if all of the files are excluded

# File lib/wunderbar/listen.rb, line 36
def self.exclude?(files)
  files.all? do |file|
    file = File.realpath(file) if File.exist? file
    EXCLUDE.any? do |exclude|
      file == exclude or file.start_with? exclude + '/'
    end
  end
end