Class: UV::Idle
Instance Method Summary collapse
Methods included from Handle
#active?, close, #close, #closing?, #initialize, #ref, #unref
Methods included from Assertions
#assert_arity, #assert_block, #assert_boolean, #assert_signal, #assert_type
Methods included from Resource
#check_result, #check_result!, #to_ptr
Methods included from Listener
define_callback, undefine_callbacks
Instance Method Details
#start(&block) ⇒ Object
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/uv/idle.rb', line 5 def start(&block) assert_block(block) assert_arity(1, block) @idle_block = block check_result! UV.idle_start(handle, callback(:on_idle)) self end |
#stop ⇒ Object
16 17 18 19 20 |
# File 'lib/uv/idle.rb', line 16 def stop check_result! UV.idle_stop(handle) self end |