Class: Neo4j::Driver::Bolt::Message::Success
- Inherits:
-
Object
- Object
- Neo4j::Driver::Bolt::Message::Success
- Defined in:
- lib/neo4j/driver/bolt/message/success.rb
Overview
Success response from Neo4j server
Instance Attribute Summary collapse
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
Instance Method Summary collapse
-
#accept(visitor) ⇒ Object
Visitor double-dispatch: streaming consumers use this to avoid
case/whenon the response class. -
#assert_success! ⇒ Object
One-shot pattern: caller expects a SUCCESS, raises otherwise.
-
#initialize(metadata = {}) ⇒ Success
constructor
A new instance of Success.
-
#terminal? ⇒ Boolean
A SUCCESS completes the request it answers — the connection uses this to tell summary responses apart from streamed RECORDs.
Constructor Details
#initialize(metadata = {}) ⇒ Success
Returns a new instance of Success.
11 12 13 |
# File 'lib/neo4j/driver/bolt/message/success.rb', line 11 def initialize( = {}) @metadata = end |
Instance Attribute Details
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
9 10 11 |
# File 'lib/neo4j/driver/bolt/message/success.rb', line 9 def @metadata end |
Instance Method Details
#accept(visitor) ⇒ Object
Visitor double-dispatch: streaming consumers use this to avoid
case/when on the response class.
17 18 19 |
# File 'lib/neo4j/driver/bolt/message/success.rb', line 17 def accept(visitor) visitor.on_success(self) end |
#assert_success! ⇒ Object
One-shot pattern: caller expects a SUCCESS, raises otherwise.
Returns self so callers can chain .metadata.
23 24 25 |
# File 'lib/neo4j/driver/bolt/message/success.rb', line 23 def assert_success! self end |
#terminal? ⇒ Boolean
A SUCCESS completes the request it answers — the connection uses this to tell summary responses apart from streamed RECORDs.
29 |
# File 'lib/neo4j/driver/bolt/message/success.rb', line 29 def terminal? = true |