Class: Neo4j::Embedded::NodesIterator
- Inherits:
-
Object
- Object
- Neo4j::Embedded::NodesIterator
- Extended by:
- Core::TxMethods
- Includes:
- Enumerable
- Defined in:
- lib/neo4j-embedded/embedded_node.rb
Instance Method Summary (collapse)
- - (Object) each(&block)
- - (Boolean) empty?
-
- (NodesIterator) initialize(node, match)
constructor
A new instance of NodesIterator.
- - (Object) inspect
Methods included from Core::TxMethods
Constructor Details
- (NodesIterator) initialize(node, match)
Returns a new instance of NodesIterator
30 31 32 33 |
# File 'lib/neo4j-embedded/embedded_node.rb', line 30 def initialize(node, match) @node = node @match = match end |
Instance Method Details
- (Object) each(&block)
39 40 41 |
# File 'lib/neo4j-embedded/embedded_node.rb', line 39 def each(&block) @node._rels(@match).each { |r| block.call(r.other_node(@node)) } end |
- (Boolean) empty?
44 45 46 |
# File 'lib/neo4j-embedded/embedded_node.rb', line 44 def empty? first.nil? end |
- (Object) inspect
35 36 37 |
# File 'lib/neo4j-embedded/embedded_node.rb', line 35 def inspect 'Enumerable<Neo4j::Node>' end |