Class: SassListen::Adapter::BSD

Inherits:
Base
  • Object
show all
Defined in:
lib/sass-listen/adapter/bsd.rb

Constant Summary collapse

OS_REGEXP =
/bsd|dragonfly/i
DEFAULTS =
{
  events: [
    :delete,
    :write,
    :extend,
    :attrib,
    :rename
    # :link, :revoke
  ]
}
BUNDLER_DECLARE_GEM =
<<-EOS.gsub(/^ {6}/, '')
  Please add the following to your Gemfile to avoid polling for changes:
    require 'rbconfig'
    if RbConfig::CONFIG['target_os'] =~ /#{OS_REGEXP}/
      gem 'rb-kqueue', '>= 0.2'
    end
EOS

Instance Attribute Summary

Attributes inherited from Base

#config, #options

Class Method Summary collapse

Methods inherited from Base

#configure, #initialize, #start, #started?, #stop

Constructor Details

This class inherits a constructor from SassListen::Adapter::Base

Class Method Details

.usable?Boolean

Returns:

  • (Boolean)


29
30
31
32
33
34
35
36
37
# File 'lib/sass-listen/adapter/bsd.rb', line 29

def self.usable?
  return false unless super
  require 'rb-kqueue'
  require 'find'
  true
rescue LoadError
  Kernel.warn BUNDLER_DECLARE_GEM
  false
end