Sha256: 58be47bcb50dcec6ef6b3a29147259e905c771b6c856d0fea65a65ee4a306535

Contents?: true

Size: 562 Bytes

Versions: 63

Compression:

Stored size: 562 Bytes

Contents

class Neo4j::Relationship
  module Wrapper
    def wrapper
      props.symbolize_keys!
      begin
        most_concrete_class = class_from_type
        wrapped_rel = most_concrete_class.constantize.new
      rescue NameError
        return self
      end

      wrapped_rel.init_on_load(self, self._start_node_id, self._end_node_id, self.rel_type)
      wrapped_rel
    end

    private

    def class_from_type
      Neo4j::ActiveRel::Types::WRAPPED_CLASSES[rel_type] || Neo4j::ActiveRel::Types::WRAPPED_CLASSES[rel_type] = rel_type.camelize
    end
  end
end

Version data entries

63 entries across 63 versions & 2 rubygems

Version Path
neo4j-6.1.12 lib/neo4j/active_rel/rel_wrapper.rb
neo4j-6.0.9 lib/neo4j/active_rel/rel_wrapper.rb
neo4j-7.0.7 lib/neo4j/active_rel/rel_wrapper.rb
neo4j-6.1.11 lib/neo4j/active_rel/rel_wrapper.rb
neo4j-7.0.6 lib/neo4j/active_rel/rel_wrapper.rb
neo4j-7.0.5 lib/neo4j/active_rel/rel_wrapper.rb
neo4j-7.0.4 lib/neo4j/active_rel/rel_wrapper.rb
neo4j-7.0.3 lib/neo4j/active_rel/rel_wrapper.rb
neo4j-7.0.2 lib/neo4j/active_rel/rel_wrapper.rb
neo4j-7.0.1 lib/neo4j/active_rel/rel_wrapper.rb
neo4j-7.0.0 lib/neo4j/active_rel/rel_wrapper.rb
neo4j-7.0.0.rc.7 lib/neo4j/active_rel/rel_wrapper.rb
neo4j-7.0.0.rc.6 lib/neo4j/active_rel/rel_wrapper.rb
neo4j-7.0.0.rc.5 lib/neo4j/active_rel/rel_wrapper.rb
neo4j-6.1.10 lib/neo4j/active_rel/rel_wrapper.rb
neo4j-6.0.8 lib/neo4j/active_rel/rel_wrapper.rb
neo4j-7.0.0.rc.4 lib/neo4j/active_rel/rel_wrapper.rb
neo4j-7.0.0.rc.3 lib/neo4j/active_rel/rel_wrapper.rb
neo4j-7.0.0.rc.2 lib/neo4j/active_rel/rel_wrapper.rb
neo4j-6.1.9 lib/neo4j/active_rel/rel_wrapper.rb