Module: Listen::Adapter
- Defined in:
- lib/listen/adapter.rb,
lib/listen/adapter/bsd.rb,
lib/listen/adapter/base.rb,
lib/listen/adapter/linux.rb,
lib/listen/adapter/config.rb,
lib/listen/adapter/darwin.rb,
lib/listen/adapter/polling.rb,
lib/listen/adapter/windows.rb
Defined Under Namespace
Classes: BSD, Base, Config, Darwin, Linux, Polling, Windows
Constant Summary collapse
- OPTIMIZED_ADAPTERS =
[Darwin, Linux, BSD, Windows].freeze
- POLLING_FALLBACK_MESSAGE =
'Listen will be polling for changes.'\ 'Learn more at https://github.com/guard/listen#listen-adapters.'.freeze
Class Method Summary collapse
Class Method Details
.select(options = {}) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/listen/adapter.rb', line 15 def select( = {}) _log :debug, 'Adapter: considering polling ...' return Polling if [:force_polling] _log :debug, 'Adapter: considering optimized backend...' return _usable_adapter_class if _usable_adapter_class _log :debug, 'Adapter: falling back to polling...' _warn_polling_fallback() Polling rescue _log :warn, format('Adapter: failed: %s:%s', $ERROR_POSITION.inspect, $ERROR_POSITION * "\n") raise end |