Class: EventMachine::FileGlobWatch::FileWatcher
- Inherits:
-
EventMachine::FileWatch
- Object
- EventMachine::FileWatch
- EventMachine::FileGlobWatch::FileWatcher
- Defined in:
- lib/em/globwatcher.rb
Instance Method Summary collapse
- #file_deleted ⇒ Object
- #file_moved ⇒ Object
-
#initialize(globwatch, &block) ⇒ FileWatcher
constructor
A new instance of FileWatcher.
Constructor Details
#initialize(globwatch, &block) ⇒ FileWatcher
Returns a new instance of FileWatcher.
149 150 151 152 |
# File 'lib/em/globwatcher.rb', line 149 def initialize(globwatch, &block) @globwatch = globwatch @block = block end |
Instance Method Details
#file_deleted ⇒ Object
159 160 161 |
# File 'lib/em/globwatcher.rb', line 159 def file_deleted block.call path end |
#file_moved ⇒ Object
154 155 156 157 |
# File 'lib/em/globwatcher.rb', line 154 def file_moved stop_watching block.call path end |