Class: Tarantool::EMDB::OneReplica
- Inherits:
-
Object
- Object
- Tarantool::EMDB::OneReplica
- Includes:
- ParseIProto
- Defined in:
- lib/tarantool/em_db.rb
Instance Method Summary collapse
- #call(result) ⇒ Object
-
#initialize(response, feed) ⇒ OneReplica
constructor
A new instance of OneReplica.
Methods included from ParseIProto
Constructor Details
#initialize(response, feed) ⇒ OneReplica
Returns a new instance of OneReplica.
78 79 80 81 |
# File 'lib/tarantool/em_db.rb', line 78 def initialize(response, feed) @response = response @feed = feed end |
Instance Method Details
#call(result) ⇒ Object
83 84 85 86 87 88 89 |
# File 'lib/tarantool/em_db.rb', line 83 def call(result) if Exception === (result = _parse_iproto(result)) @feed.call result else @feed.call @response.parse_response_for_cb(result) end end |