Class: EM::PG::Watcher
- Inherits:
-
Connection
- Object
- Connection
- EM::PG::Watcher
- Defined in:
- lib/em/pg.rb
Instance Attribute Summary collapse
-
#postgres ⇒ Object
Returns the value of attribute postgres.
Instance Method Summary collapse
-
#initialize(postgres) ⇒ Watcher
constructor
A new instance of Watcher.
- #notify_readable ⇒ Object
- #notify_writable ⇒ Object
- #unbind ⇒ Object
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
#postgres ⇒ Object
Returns the value of attribute postgres.
30 31 32 |
# File 'lib/em/pg.rb', line 30 def postgres @postgres end |
Instance Method Details
#notify_readable ⇒ Object
35 36 37 |
# File 'lib/em/pg.rb', line 35 def notify_readable @postgres.handle end |
#notify_writable ⇒ Object
39 40 41 42 |
# File 'lib/em/pg.rb', line 39 def notify_writable self.notify_writable = false @postgres.handle end |
#unbind ⇒ Object
44 45 46 |
# File 'lib/em/pg.rb', line 44 def unbind @postgres.unbind end |