Class: Libuv::FSEvent
- Inherits:
-
Handle
- Object
- Q::Promise
- Q::DeferredPromise
- Handle
- Libuv::FSEvent
- Defined in:
- lib/libuv/fs_event.rb
Constant Summary collapse
- EVENTS =
{1 => :rename, 2 => :change}.freeze
Constants included from Assertions
Constants inherited from Q::Promise
Instance Attribute Summary
Attributes inherited from Handle
Instance Method Summary collapse
-
#initialize(loop, path) ⇒ FSEvent
constructor
A new instance of FSEvent.
Methods inherited from Handle
#active?, #close, #closing?, #ref, #unref
Methods included from Assertions
#assert_block, #assert_boolean, #assert_type
Methods included from Resource
#check_result, #check_result!, #resolve, #to_ptr
Methods inherited from Q::DeferredPromise
Methods inherited from Q::Promise
Constructor Details
#initialize(loop, path) ⇒ FSEvent
Returns a new instance of FSEvent.
8 9 10 11 12 13 14 15 |
# File 'lib/libuv/fs_event.rb', line 8 def initialize(loop, path) @loop = loop fs_event_ptr = ::Libuv::Ext.create_handle(:uv_fs_event) error = check_result ::Libuv::Ext.fs_event_init(loop.handle, fs_event_ptr, path, callback(:on_fs_event), 0) super(fs_event_ptr, error) end |