class SassListen::Record::SymlinkDetector

Constants

WIKI

Public Class Methods

new() click to toggle source
# File lib/sass-listen/record/symlink_detector.rb, line 22
def initialize
  @real_dirs = Set.new
end

Public Instance Methods

verify_unwatched!(entry) click to toggle source
# 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

Private Instance Methods

_fail(symlinked, real_path) click to toggle source
# File lib/sass-listen/record/symlink_detector.rb, line 33
def _fail(symlinked, real_path)
  STDERR.puts format(SYMLINK_LOOP_ERROR, symlinked, real_path)
  fail Error, 'Failed due to looped symlinks'
end