Class: Coolio::IO::Watcher
- Inherits:
-
Coolio::IOWatcher
- Object
- Watcher
- Coolio::IOWatcher
- Coolio::IO::Watcher
- Defined in:
- lib/cool.io/io.rb
Overview
Internal class implementing watchers used by Coolio::IO
Instance Method Summary collapse
-
#initialize(ruby_io, coolio_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 Coolio::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, coolio_io, flags) ⇒ Watcher
Returns a new instance of Watcher.
179 180 181 182 |
# File 'lib/cool.io/io.rb', line 179 def initialize(ruby_io, coolio_io, flags) @coolio_io = coolio_io super(ruby_io, flags) end |
Instance Method Details
#on_readable ⇒ Object
Configure IOWatcher event callbacks to call the method passed to #initialize
185 186 187 |
# File 'lib/cool.io/io.rb', line 185 def on_readable @coolio_io.__send__(:on_readable) end |
#on_writable ⇒ Object
189 190 191 |
# File 'lib/cool.io/io.rb', line 189 def on_writable @coolio_io.__send__(:on_writable) end |