Class: Rev::IO::Watcher

Inherits:
Rev::IOWatcher show all
Defined in:
lib/rev/io.rb

Overview

Internal class implementing watchers used by Rev::IO

Instance Method Summary collapse

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_readableObject

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_writableObject



164
# File 'lib/rev/io.rb', line 164

def on_writable; @rev_io.__send__(:on_writable); end