Module: Harnex::Watcher
- Defined in:
- lib/harnex/watcher.rb
Class Method Summary collapse
Class Method Details
.available? ⇒ Boolean
8 9 10 |
# File 'lib/harnex/watcher.rb', line 8 def available? true end |
.backend ⇒ Object
20 21 22 |
# File 'lib/harnex/watcher.rb', line 20 def backend Inotify.available? ? :inotify : :polling end |
.directory_io(path, events) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/harnex/watcher.rb', line 12 def directory_io(path, events) if Inotify.available? Inotify.directory_io(path, events) else Polling.directory_io(path, events) end end |