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.



31
32
33
# File 'lib/em/pg.rb', line 31

def initialize(postgres)
  @postgres = postgres
end

Instance Attribute Details

#postgresObject

Returns the value of attribute postgres.



30
31
32
# File 'lib/em/pg.rb', line 30

def postgres
  @postgres
end

Instance Method Details

#notify_readableObject



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

def notify_readable
  @postgres.handle
end

#notify_writableObject



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

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

#unbindObject



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

def unbind
  @postgres.unbind
end