Class: Listen::Adapters::Windows
- Inherits:
-
Listen::Adapter
- Object
- Listen::Adapter
- Listen::Adapters::Windows
- Defined in:
- lib/listen/adapters/windows.rb
Overview
Adapter implementation for Windows ‘wdm`.
Constant Summary collapse
- BUNDLER_DECLARE_GEM =
<<-EOS.gsub(/^ {6}/, '') Please add the following to your Gemfile to avoid polling for changes: require 'rbconfig' gem 'wdm', '>= 0.1.0' if RbConfig::CONFIG['target_os'] =~ /mswin|mingw/i EOS
Constants inherited from Listen::Adapter
Listen::Adapter::ADAPTERS, Listen::Adapter::DEFAULT_LATENCY, Listen::Adapter::FALLBACK_ADAPTERS, Listen::Adapter::OPTIMIZED_ADAPTERS, Listen::Adapter::POLLING_FALLBACK_MESSAGE
Instance Attribute Summary
Attributes inherited from Listen::Adapter
#callback, #changed_directories, #directories, #latency, #mutex, #paused, #poller_thread, #stopped, #turnstile, #worker, #worker_thread
Class Method Summary collapse
- .adapter_gem ⇒ Object
-
.load_dependent_adapter ⇒ Boolean
Load the adapter gem.
- .target_os_regex ⇒ Object
-
.usable? ⇒ Boolean
Checks if the adapter is usable on target OS.
Methods inherited from Listen::Adapter
#initialize, #pause, #paused?, #report_changes, select_and_initialize, #start, #start!, #started?, #stop, #unpause, usable_and_works?, #wait_for_callback, #wait_for_changes, works?
Constructor Details
This class inherits a constructor from Listen::Adapter
Class Method Details
.adapter_gem ⇒ Object
18 |
# File 'lib/listen/adapters/windows.rb', line 18 def self.adapter_gem; 'wdm'; end |
.load_dependent_adapter ⇒ Boolean
Load the adapter gem
32 33 34 35 36 |
# File 'lib/listen/adapters/windows.rb', line 32 def self.load_dependent_adapter super rescue Gem::LoadError Kernel.warn BUNDLER_DECLARE_GEM end |
.target_os_regex ⇒ Object
17 |
# File 'lib/listen/adapters/windows.rb', line 17 def self.target_os_regex; /mswin|mingw/i; end |
.usable? ⇒ Boolean
Checks if the adapter is usable on target OS.
24 25 26 |
# File 'lib/listen/adapters/windows.rb', line 24 def self.usable? super if mri? && at_least_ruby_1_9? end |