Class: Neo4j::Embedded::RelsIterator
- Inherits:
-
Object
- Object
- Neo4j::Embedded::RelsIterator
- Extended by:
- Core::TxMethods
- Includes:
- Enumerable
- Defined in:
- lib/neo4j-embedded/embedded_node.rb
Instance Method Summary (collapse)
- - (Object) each(&block)
- - (Boolean) empty?
-
- (RelsIterator) initialize(node, match)
constructor
A new instance of RelsIterator.
- - (Object) inspect
Methods included from Core::TxMethods
Constructor Details
- (RelsIterator) initialize(node, match)
Returns a new instance of RelsIterator
7 8 9 10 |
# File 'lib/neo4j-embedded/embedded_node.rb', line 7 def initialize(node, match) @node = node @match = match end |
Instance Method Details
- (Object) each(&block)
16 17 18 |
# File 'lib/neo4j-embedded/embedded_node.rb', line 16 def each(&block) @node._rels(@match).each { |r| block.call(r.wrapper) } end |
- (Boolean) empty?
21 22 23 |
# File 'lib/neo4j-embedded/embedded_node.rb', line 21 def empty? first.nil? end |
- (Object) inspect
12 13 14 |
# File 'lib/neo4j-embedded/embedded_node.rb', line 12 def inspect 'Enumerable<Neo4j::Relationship>' end |