Sha256: 6c50e458706833133b344186059d4d3c6c047d384a87c72b29af82b8a5006137

Contents?: true

Size: 482 Bytes

Versions: 13

Compression:

Stored size: 482 Bytes

Contents

module Neo4j
  module ToJava

    def type_to_java(type)
      org.neo4j.graphdb.DynamicRelationshipType.withName(type.to_s)
    end

    def dir_to_java(dir)
      case dir
        when :outgoing then org.neo4j.graphdb.Direction::OUTGOING
        when :both     then org.neo4j.graphdb.Direction::BOTH
        when :incoming then org.neo4j.graphdb.Direction::INCOMING
        else raise "unknown direction '#{dir}', expects :outgoing, :incoming or :both"
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
neo4j-1.0.0.beta.13 lib/neo4j/to_java.rb
neo4j-1.0.0.beta.12 lib/neo4j/to_java.rb
neo4j-1.0.0.beta.11 lib/neo4j/to_java.rb
neo4j-1.0.0.beta.10 lib/neo4j/to_java.rb
neo4j-1.0.0.beta.9 lib/neo4j/to_java.rb
neo4j-1.0.0.beta.8 lib/neo4j/to_java.rb
neo4j-1.0.0.beta.7 lib/neo4j/to_java.rb
neo4j-1.0.0.beta.6 lib/neo4j/to_java.rb
neo4j-1.0.0.beta.5 lib/neo4j/to_java.rb
neo4j-1.0.0.beta.4 lib/neo4j/to_java.rb
neo4j-1.0.0.beta.3 lib/neo4j/to_java.rb
neo4j-1.0.0.beta.2 lib/neo4j/to_java.rb
neo4j-1.0.0.beta.1 lib/neo4j/to_java.rb