Class: Neo4j::Embedded::NodesIterator

Inherits:
Object
  • Object
show all
Extended by:
Core::TxMethods
Includes:
Enumerable
Defined in:
lib/neo4j-embedded/embedded_node.rb

Instance Method Summary (collapse)

Methods included from Core::TxMethods

tx_methods

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?

Returns:

  • (Boolean)


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