Class: JRubyNotify::Listener
- Inherits:
-
Object
- Object
- JRubyNotify::Listener
- Includes:
- Java::NetContentobjectsJnotify::JNotifyListener
- Defined in:
- lib/jruby-notify/listener.rb
Instance Method Summary collapse
- #file_created(watch, path, file) ⇒ Object
- #file_deleted(watch, path, file) ⇒ Object
- #file_modified(watch, path, file) ⇒ Object
- #file_renamed(watch, path, file, old) ⇒ Object
-
#initialize(callback) ⇒ Listener
constructor
A new instance of Listener.
Constructor Details
#initialize(callback) ⇒ Listener
Returns a new instance of Listener.
7 8 9 |
# File 'lib/jruby-notify/listener.rb', line 7 def initialize(callback) @callback = callback end |
Instance Method Details
#file_created(watch, path, file) ⇒ Object
23 24 25 |
# File 'lib/jruby-notify/listener.rb', line 23 def file_created(watch, path, file) @callback.call(path, file) end |
#file_deleted(watch, path, file) ⇒ Object
19 20 21 |
# File 'lib/jruby-notify/listener.rb', line 19 def file_deleted(watch, path, file) @callback.call(path, file) end |
#file_modified(watch, path, file) ⇒ Object
15 16 17 |
# File 'lib/jruby-notify/listener.rb', line 15 def file_modified(watch, path, file) @callback.call(path, file) end |
#file_renamed(watch, path, file, old) ⇒ Object
11 12 13 |
# File 'lib/jruby-notify/listener.rb', line 11 def file_renamed(watch, path, file, old) @callback.call(path, file, old) end |