Class: SassListen::Record::SymlinkDetector

Inherits:
Object
  • Object
show all
Defined in:
lib/sass-listen/record/symlink_detector.rb

Defined Under Namespace

Classes: Error

Constant Summary collapse

WIKI =
'https://github.com/guard/listen/wiki/Duplicate-directory-errors'
<<-EOS
  ** ERROR: directory is already being watched! **

  Directory: %s

  is already being watched through: %s

  MORE INFO: #{WIKI}
EOS

Instance Method Summary collapse

Constructor Details

#initializeSymlinkDetector

Returns a new instance of SymlinkDetector.


22
23
24
# File 'lib/sass-listen/record/symlink_detector.rb', line 22

def initialize
  @real_dirs = Set.new
end

Instance Method Details

#verify_unwatched!(entry) ⇒ Object


26
27
28
29
# File 'lib/sass-listen/record/symlink_detector.rb', line 26

def verify_unwatched!(entry)
  real_path = entry.real_path
  @real_dirs.add?(real_path) || _fail(entry.sys_path, real_path)
end