Method: Neo4j::ActiveNode::Query::QueryProxyEnumerable#each

Defined in:
lib/neo4j/active_node/query/query_proxy_enumerable.rb

#each(node = true, rel = nil, &block) ⇒ Enumerable

Just like every other each but it allows for optional params to support the versions that also return relationships. The node and rel params are typically used by those other methods but there’s nothing stopping you from using ‘your_node.each(true, true)` instead of your_node.each_with_rel.

Returns:

  • An enumerable containing some combination of nodes and rels.



12
13
14
# File 'lib/neo4j/active_node/query/query_proxy_enumerable.rb', line 12

def each(node = true, rel = nil, &block)
  result(node, rel).each(&block)
end