Class: EM::PG::Watcher

Inherits:
Connection
  • Object
show all
Defined in:
lib/em/pg.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(postgres) ⇒ Watcher

Returns a new instance of Watcher.



35
36
37
# File 'lib/em/pg.rb', line 35

def initialize(postgres)
  @postgres = postgres
end

Instance Attribute Details

#postgresObject

Returns the value of attribute postgres.



34
35
36
# File 'lib/em/pg.rb', line 34

def postgres
  @postgres
end

Instance Method Details

#notify_readableObject



39
40
41
# File 'lib/em/pg.rb', line 39

def notify_readable
  @postgres.handle
end

#notify_writableObject



43
44
45
46
# File 'lib/em/pg.rb', line 43

def notify_writable
  self.notify_writable = false
  @postgres.handle
end

#unbindObject



48
49
50
# File 'lib/em/pg.rb', line 48

def unbind
  @postgres.unbind
end