Class: Listen::Adapter::Windows
- Defined in:
- lib/listen/adapter/windows.rb
Overview
Adapter implementation for Windows wdm.
Constant Summary collapse
- BUNDLER_DECLARE_GEM =
The message to show when wdm gem isn’t available
" Please add the following to your Gemfile to avoid polling for changes:\n require 'rbconfig'\n gem 'wdm', '>= 0.1.0' if RbConfig::CONFIG['target_os'] =~ /mswin|mingw|cygwin/i\n".gsub(/^ {6}/, '')
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Listen::Adapter::Base
Class Method Details
.usable? ⇒ Boolean
16 17 18 19 20 21 22 23 |
# File 'lib/listen/adapter/windows.rb', line 16 def self.usable? if RbConfig::CONFIG['target_os'] =~ /mswin|mingw|cygwin/i require 'wdm' true end rescue Gem::LoadError Kernel.warn BUNDLER_DECLARE_GEM end |
Instance Method Details
#start ⇒ Object
25 26 27 28 |
# File 'lib/listen/adapter/windows.rb', line 25 def start worker = _init_worker worker.run! end |