Class: Neo4j::Server::CypherResponse::HashEnumeration
- Inherits:
-
Object
- Object
- Neo4j::Server::CypherResponse::HashEnumeration
- Extended by:
- Forwardable
- Includes:
- Enumerable
- Defined in:
- lib/neo4j-server/cypher_response.rb
Instance Method Summary (collapse)
- - (Object) each(&block)
-
- (HashEnumeration) initialize(response, query)
constructor
A new instance of HashEnumeration.
- - (Object) inspect
- - (Object) to_s
Constructor Details
- (HashEnumeration) initialize(response, query)
Returns a new instance of HashEnumeration
26 27 28 29 |
# File 'lib/neo4j-server/cypher_response.rb', line 26 def initialize(response, query) @response = response @query = query end |
Instance Method Details
- (Object) each(&block)
39 40 41 42 43 44 45 |
# File 'lib/neo4j-server/cypher_response.rb', line 39 def each(&block) @response.each_data_row do |row| yield(row.each_with_index.each_with_object(struct.new) do |(value, i), result| result[columns[i].to_sym] = value end) end end |
- (Object) inspect
35 36 37 |
# File 'lib/neo4j-server/cypher_response.rb', line 35 def inspect "Enumerable query: '#{@query}'" end |
- (Object) to_s
31 32 33 |
# File 'lib/neo4j-server/cypher_response.rb', line 31 def to_s @query end |