Class: Listen::Adapters::Polling
- Inherits:
-
Listen::Adapter
- Object
- Listen::Adapter
- Listen::Adapters::Polling
- Defined in:
- lib/listen/adapters/polling.rb
Overview
Polling Adapter that works cross-platform and has no dependencies. This is the adapter that uses the most CPU processing power and has higher file IO that the other implementations.
Constant Summary
Constants inherited from Listen::Adapter
Listen::Adapter::DEFAULT_LATENCY, Listen::Adapter::POLLING_FALLBACK_MESSAGE
Instance Attribute Summary
Attributes inherited from Listen::Adapter
Instance Method Summary collapse
-
#initialize(directory, options = {}, &callback) ⇒ Polling
constructor
Initialize the Adapter.
-
#start ⇒ Object
Start the adapter.
-
#stop ⇒ Object
Stop the adapter.
Methods inherited from Listen::Adapter
Constructor Details
#initialize(directory, options = {}, &callback) ⇒ Polling
Initialize the Adapter. See Listen::Adapter#initialize for more info.
16 17 18 19 |
# File 'lib/listen/adapters/polling.rb', line 16 def initialize(directory, = {}, &callback) @latency ||= DEFAULT_POLLING_LATENCY super end |
Instance Method Details
#start ⇒ Object
Start the adapter.
23 24 25 26 |
# File 'lib/listen/adapters/polling.rb', line 23 def start super poll end |
#stop ⇒ Object
Stop the adapter.
30 31 32 |
# File 'lib/listen/adapters/polling.rb', line 30 def stop super end |