Sha256: 7ee3202397eca912b22679879f45e8cf5cdb1c6a7ca82fabe9b62b03b169cdac
Contents?: true
Size: 508 Bytes
Versions: 11
Compression:
Stored size: 508 Bytes
Contents
require 'eventmachine-tail' module RemoteSyslog class GlobWatch < EventMachine::FileGlobWatch def initialize(path, interval, exclude_files, callback) @exclude_files = exclude_files @callback = callback super(path, interval) end def file_found(path) # Check if we should exclude this file if @exclude_files && @exclude_files =~ path return end @callback.call(path) end def file_deleted(path) # Nothing to do end end end
Version data entries
11 entries across 11 versions & 1 rubygems