Class: Rev::IO::Watcher
- Inherits:
-
Rev::IOWatcher
- Object
- Watcher
- Rev::IOWatcher
- Rev::IO::Watcher
- Defined in:
- lib/rev/io.rb
Overview
Internal class implementing watchers used by Rev::IO
Instance Method Summary collapse
-
#initialize(ruby_io, rev_io, flags) ⇒ Watcher
constructor
A new instance of Watcher.
-
#on_readable ⇒ Object
Configure IOWatcher event callbacks to call the method passed to #initialize.
- #on_writable ⇒ Object
Methods inherited from Rev::IOWatcher
#attach, #detach, #disable, #enable
Methods included from Meta
#event_callback, #watcher_delegate
Methods inherited from Watcher
#attach, #attached?, #detach, #disable, #enable, #enabled?, #evloop
Constructor Details
#initialize(ruby_io, rev_io, flags) ⇒ Watcher
Returns a new instance of Watcher.
157 158 159 160 |
# File 'lib/rev/io.rb', line 157 def initialize(ruby_io, rev_io, flags) @rev_io = rev_io super(ruby_io, flags) end |
Instance Method Details
#on_readable ⇒ Object
Configure IOWatcher event callbacks to call the method passed to #initialize
163 |
# File 'lib/rev/io.rb', line 163 def on_readable; @rev_io.__send__(:on_readable); end |
#on_writable ⇒ Object
164 |
# File 'lib/rev/io.rb', line 164 def on_writable; @rev_io.__send__(:on_writable); end |