Class: RethinkDB::AsyncHandler
- Inherits:
-
Object
- Object
- RethinkDB::AsyncHandler
- Defined in:
- lib/nobrainer_streams/rethinkdb_monkeypatch.rb
Overview
Extend this class to define a new way of running rethinkdb queries asynchronously
Direct Known Subclasses
Instance Attribute Summary collapse
-
#callback ⇒ Object
The callback is set to be the user defined callback by the #async_run method.
-
#connection ⇒ Object
Returns the value of attribute connection.
-
#options ⇒ Object
Returns the value of attribute options.
Instance Method Summary collapse
-
#handler ⇒ Object
This method should return a handler that will deal with incoming messages.
-
#run(&action) ⇒ Object
This method is called with a block that runs a rethinkdb connection synchronously.
Instance Attribute Details
#callback ⇒ Object
The callback is set to be the user defined callback by the #async_run method
8 9 10 |
# File 'lib/nobrainer_streams/rethinkdb_monkeypatch.rb', line 8 def callback @callback end |
#connection ⇒ Object
Returns the value of attribute connection.
9 10 11 |
# File 'lib/nobrainer_streams/rethinkdb_monkeypatch.rb', line 9 def connection @connection end |
#options ⇒ Object
Returns the value of attribute options.
10 11 12 |
# File 'lib/nobrainer_streams/rethinkdb_monkeypatch.rb', line 10 def @options end |
Instance Method Details
#handler ⇒ Object
This method should return a handler that will deal with incoming messages
19 20 21 |
# File 'lib/nobrainer_streams/rethinkdb_monkeypatch.rb', line 19 def handler raise "Must override AsyncHandler#handler" end |
#run(&action) ⇒ Object
This method is called with a block that runs a rethinkdb connection synchronously
14 15 16 |
# File 'lib/nobrainer_streams/rethinkdb_monkeypatch.rb', line 14 def run(&action) raise "Must override AsyncHandler#run" end |