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-7.2.3 lib/neo4j/active_rel/rel_wrapper.rb
neo4j-7.2.2 lib/neo4j/active_rel/rel_wrapper.rb
neo4j-7.1.4 lib/neo4j/active_rel/rel_wrapper.rb
neo4j-7.0.16 lib/neo4j/active_rel/rel_wrapper.rb
neo4j-7.2.1 lib/neo4j/active_rel/rel_wrapper.rb
neo4j_legacy-7.2.0.2 lib/neo4j/active_rel/rel_wrapper.rb
neo4j_legacy-7.2.0.1 lib/neo4j/active_rel/rel_wrapper.rb
neo4j-7.2.0 lib/neo4j/active_rel/rel_wrapper.rb
neo4j-7.1.3 lib/neo4j/active_rel/rel_wrapper.rb
neo4j-7.0.15 lib/neo4j/active_rel/rel_wrapper.rb
neo4j-7.1.2 lib/neo4j/active_rel/rel_wrapper.rb
neo4j-7.1.1 lib/neo4j/active_rel/rel_wrapper.rb
neo4j-7.1.0 lib/neo4j/active_rel/rel_wrapper.rb
neo4j-7.0.14 lib/neo4j/active_rel/rel_wrapper.rb
neo4j-7.0.13 lib/neo4j/active_rel/rel_wrapper.rb
neo4j-7.0.12 lib/neo4j/active_rel/rel_wrapper.rb
neo4j-7.0.11 lib/neo4j/active_rel/rel_wrapper.rb
neo4j-7.0.10 lib/neo4j/active_rel/rel_wrapper.rb
neo4j-7.0.9 lib/neo4j/active_rel/rel_wrapper.rb
neo4j-7.0.8 lib/neo4j/active_rel/rel_wrapper.rb