Watchers are Rev‘s event observers. They contain a set of callback methods prefixed by on_* which fire whenever events occur.
In order for a watcher to fire events it must be attached to a running loop. Every watcher has an attach and detach method to control which loop it‘s associated with.
Watchers also have an enable and disable method. This allows a watcher to temporarily ignore certain events while remaining attached to a given loop. This is good for watchers which need to be toggled on and off.
VERSION | = | '0.1.2' unless defined? Rev::VERSION | ||
LIBEV_VERSION | = | rb_sprintf("%d.%d", ev_version_major(), ev_version_minor()) | Make libev version available in Ruby |