Class: DirectoryWatcher::RevScanner::ScanTimer
- Inherits:
-
Rev::TimerWatcher
- Object
- Rev::TimerWatcher
- DirectoryWatcher::RevScanner::ScanTimer
- Defined in:
- lib/directory_watcher/rev_scanner.rb
Overview
Periodically execute a Scan. Hook this into the EventableScanner#on_scan
Instance Method Summary collapse
-
#initialize(scanner) ⇒ ScanTimer
constructor
A new instance of ScanTimer.
- #on_timer(*args) ⇒ Object
Constructor Details
#initialize(scanner) ⇒ ScanTimer
Returns a new instance of ScanTimer.
109 110 111 112 |
# File 'lib/directory_watcher/rev_scanner.rb', line 109 def initialize( scanner ) super(scanner.interval, true) @scanner = scanner end |
Instance Method Details
#on_timer(*args) ⇒ Object
114 115 116 |
# File 'lib/directory_watcher/rev_scanner.rb', line 114 def on_timer( *args ) @scanner.on_scan end |