Sha256: 3e1d8c3e5db9c771df3fab25f9d0a2cf3e19f6f65121a2c048b0ce704770f90e
Contents?: true
Size: 707 Bytes
Versions: 20
Compression:
Stored size: 707 Bytes
Contents
module Neo4j module Core module Traversal # Implements the Neo4j Predicate Java interface, only used internally. # @private class FilterPredicate include Java::OrgNeo4jHelpers::Predicate def initialize @procs = [] end def add(proc) @procs << proc end def include_start_node @include_start_node = true end def accept(path) return false if @include_start_node && path.length == 0 # find the first filter which returns false # if not found then we will accept this path @procs.find { |p| !p.call(path) }.nil? end end end end end
Version data entries
20 entries across 20 versions & 1 rubygems