Class: Coolio::IO::Watcher

Inherits:
Coolio::IOWatcher show all
Defined in:
lib/cool.io/io.rb

Overview

Internal class implementing watchers used by Coolio::IO

Instance Method Summary collapse

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_readableObject

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_writableObject



189
190
191
# File 'lib/cool.io/io.rb', line 189

def on_writable
  @coolio_io.__send__(:on_writable)
end