Sha256: b8c0b30477fc21054c4d3f53aea5d02e0de9adfc88f0c0833a1ee4a468f99aac

Contents?: true

Size: 873 Bytes

Versions: 17

Compression:

Stored size: 873 Bytes

Contents

module Neo4j
  module Core
    module Traversal
      # Extends the Neo4j::Core Traverser in order to add rule traversal methods.
      class Traverser
        def filter_method(name, &proc)
          # add method name
          singelton = class << self;
            self;
          end
          singelton.send(:define_method, name) { filter &proc }
          self
        end


        def functions_method(func, rule_node, rule_name)
          singelton = class << self;
            self;
          end
          singelton.send(:define_method, func.class.function_name) do |*args|
            function_id = args.empty? ? "_classname" : args[0]
            function = rule_node.find_function(rule_name, func.class.function_name, function_id)
            function.value(rule_node.rule_node, rule_name)
          end
          self
        end
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
neo4j-wrapper-2.3.0-java lib/neo4j-wrapper/rule/neo4j_core_ext/traverser.rb
neo4j-wrapper-2.2.4-java lib/neo4j-wrapper/rule/neo4j_core_ext/traverser.rb
neo4j-wrapper-2.2.3-java lib/neo4j-wrapper/rule/neo4j_core_ext/traverser.rb
neo4j-wrapper-2.2.1-java lib/neo4j-wrapper/rule/neo4j_core_ext/traverser.rb
neo4j-wrapper-2.2.0-java lib/neo4j-wrapper/rule/neo4j_core_ext/traverser.rb
neo4j-wrapper-2.2.0.rc1-java lib/neo4j-wrapper/rule/neo4j_core_ext/traverser.rb
neo4j-wrapper-2.1.0-java lib/neo4j-wrapper/rule/neo4j_core_ext/traverser.rb
neo4j-wrapper-2.0.1-java lib/neo4j-wrapper/rule/neo4j_core_ext/traverser.rb
neo4j-wrapper-2.0.0-java lib/neo4j-wrapper/rule/neo4j_core_ext/traverser.rb
neo4j-wrapper-2.0.0.rc2-java lib/neo4j-wrapper/rule/neo4j_core_ext/traverser.rb
neo4j-wrapper-2.0.0.rc1-java lib/neo4j-wrapper/rule/neo4j_core_ext/traverser.rb
neo4j-wrapper-0.0.11-java lib/neo4j-wrapper/rule/neo4j_core_ext/traverser.rb
neo4j-wrapper-0.0.10-java lib/neo4j-wrapper/rule/neo4j_core_ext/traverser.rb
neo4j-wrapper-0.0.9-java lib/neo4j-wrapper/rule/neo4j_core_ext/traverser.rb
neo4j-wrapper-0.0.8-java lib/neo4j-wrapper/rule/neo4j_core_ext/traverser.rb
neo4j-wrapper-0.0.7-java lib/neo4j-wrapper/rule/neo4j_core_ext/traverser.rb
neo4j-wrapper-0.0.6-java lib/neo4j-wrapper/rule/neo4j_core_ext/traverser.rb