Class: FileWatch::TailMode::Handlers::Create
- Inherits:
-
Base
- Object
- Base
- FileWatch::TailMode::Handlers::Create
show all
- Defined in:
- lib/filewatch/tail_mode/handlers/create.rb
Instance Attribute Summary
Attributes inherited from Base
#sincedb_collection
Instance Method Summary
collapse
Methods inherited from Base
#handle, #initialize, #quit?
Instance Method Details
permalink
#handle_specifically(watched_file) ⇒ Object
[View source]
5
6
7
8
9
|
# File 'lib/filewatch/tail_mode/handlers/create.rb', line 5
def handle_specifically(watched_file)
if open_file(watched_file)
add_or_update_sincedb_collection(watched_file) unless sincedb_collection.member?(watched_file.sincedb_key)
end
end
|
permalink
#update_existing_specifically(watched_file, sincedb_value) ⇒ Object
[View source]
11
12
13
14
|
# File 'lib/filewatch/tail_mode/handlers/create.rb', line 11
def update_existing_specifically(watched_file, sincedb_value)
watched_file.update_bytes_read(sincedb_value.position)
end
|