Class: LightIO::Watchers::Watcher

Inherits:
Object
  • Object
show all
Defined in:
lib/lightio/watchers/watcher.rb

Direct Known Subclasses

IO, Schedule, Timer

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#callbackObject (readonly)

Returns the value of attribute callback.



4
5
6
# File 'lib/lightio/watchers/watcher.rb', line 4

def callback
  @callback
end

Instance Method Details

#set_callback(&blk) ⇒ Object

Raises:



6
7
8
9
# File 'lib/lightio/watchers/watcher.rb', line 6

def set_callback(&blk)
  raise Error, "already has callback" if @callback
  @callback = blk
end

#start(backend) ⇒ Object



11
12
13
# File 'lib/lightio/watchers/watcher.rb', line 11

def start(backend)
  raise
end