Class: Neo4j::Embedded::RelsIterator

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

- (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?

Returns:

  • (Boolean)


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