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.
33 34 35 36 |
# File 'lib/neo4j-embedded/embedded_node.rb', line 33 def initialize(node, match) @node = node @match = match end |
Instance Method Details
#each(&block) ⇒ Object
42 43 44 |
# File 'lib/neo4j-embedded/embedded_node.rb', line 42 def each(&block) @node._rels(@match).each { |r| block.call(r.other_node(@node)) } end |
#empty? ⇒ Boolean
47 48 49 |
# File 'lib/neo4j-embedded/embedded_node.rb', line 47 def empty? first.nil? end |
#inspect ⇒ Object
38 39 40 |
# File 'lib/neo4j-embedded/embedded_node.rb', line 38 def inspect 'Enumerable<Neo4j::Node>' end |