Class: RemoteSyslog::GlobWatch
- Inherits:
-
EventMachine::FileGlobWatch
- Object
- EventMachine::FileGlobWatch
- RemoteSyslog::GlobWatch
- Defined in:
- lib/remote_syslog/glob_watch.rb
Instance Method Summary collapse
- #file_deleted(path) ⇒ Object
- #file_found(path) ⇒ Object
-
#initialize(path, interval, exclude_files, callback) ⇒ GlobWatch
constructor
A new instance of GlobWatch.
Constructor Details
#initialize(path, interval, exclude_files, callback) ⇒ GlobWatch
Returns a new instance of GlobWatch.
5 6 7 8 9 10 |
# File 'lib/remote_syslog/glob_watch.rb', line 5 def initialize(path, interval, exclude_files, callback) @exclude_files = exclude_files @callback = callback super(path, interval) end |
Instance Method Details
#file_deleted(path) ⇒ Object
21 22 23 |
# File 'lib/remote_syslog/glob_watch.rb', line 21 def file_deleted(path) # Nothing to do end |
#file_found(path) ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/remote_syslog/glob_watch.rb', line 12 def file_found(path) # Check if we should exclude this file if @exclude_files && @exclude_files =~ path return end @callback.call(path) end |