Sha256: 60cb1b26dee9fdb95f9a6ae9298f1cbb543684c22f722c142444bad7edada937
Contents?: true
Size: 649 Bytes
Versions: 26
Compression:
Stored size: 649 Bytes
Contents
module Neo4j module Traversal class RelExpander include org.neo4j.graphdb.RelationshipExpander attr_accessor :reversed def initialize(&block) @block = block @reverse = false end def self.create_pair(&block) normal = RelExpander.new(&block) reversed = RelExpander.new(&block) normal.reversed = reversed reversed.reversed = normal reversed.reverse! normal end def expand(node) @block.arity == 1 ? @block.call(node) : @block.call(node, @reverse) end def reverse! @reverse = true end end end end
Version data entries
26 entries across 26 versions & 1 rubygems