Method: Neo4j::ActiveNode::Query::QueryProxyEnumerable#each_with_rel
- Defined in:
- lib/neo4j/active_node/query/query_proxy_enumerable.rb
#each_with_rel(&block) ⇒ Object
When called at the end of a QueryProxy chain, it will return the nodes and relationships of the last link. For example, to return a lesson and each relationship to a given student:
- .. code-block
-
ruby
student.lessons.each_with_rel do |lesson, rel|
64 65 66 |
# File 'lib/neo4j/active_node/query/query_proxy_enumerable.rb', line 64 def each_with_rel(&block) block_given? ? each(true, true, &block) : to_enum(:each, true, true) end |