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
- #each(&block) ⇒ Object
- #empty? ⇒ Boolean
-
#initialize(node, match) ⇒ NodesIterator
constructor
A new instance of NodesIterator.
- #inspect ⇒ Object
Methods included from Core::TxMethods
Constructor Details
#initialize(node, match) ⇒ NodesIterator
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
#each(&block) ⇒ Object
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 |
#empty? ⇒ Boolean
44 45 46 |
# File 'lib/neo4j-embedded/embedded_node.rb', line 44 def empty? first.nil? end |
#inspect ⇒ Object
35 36 37 |
# File 'lib/neo4j-embedded/embedded_node.rb', line 35 def inspect 'Enumerable<Neo4j::Node>' end |