Sha256: 5856090538415472347122d7fa07c93423e8881de04dafa5566c476f5cc60878

Contents?: true

Size: 794 Bytes

Versions: 15

Compression:

Stored size: 794 Bytes

Contents

module Neo4j::Shared
  module Initialize
    extend ActiveSupport::Concern

    # Implements the Neo4j::Node#wrapper and Neo4j::Relationship#wrapper method
    # so that we don't have to care if the node is wrapped or not.
    # @return self
    def wrapper
      self
    end

    private

    def convert_and_assign_attributes(properties)
      @attributes ||= self.class.attributes_nil_hash.dup
      stringify_attributes!(@attributes, properties)
      self.default_properties = properties
      self.class.declared_property_manager.convert_properties_to(self, :ruby, @attributes)
    end

    def stringify_attributes!(attr, properties)
      properties.each_pair do |k, v|
        key = self.class.declared_property_manager.string_key(k)
        attr[key] = v
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
neo4j-5.0.15 lib/neo4j/shared/initialize.rb
neo4j-5.0.14 lib/neo4j/shared/initialize.rb
neo4j-5.0.13 lib/neo4j/shared/initialize.rb
neo4j-5.0.12 lib/neo4j/shared/initialize.rb
neo4j-5.0.11 lib/neo4j/shared/initialize.rb
neo4j-5.0.10 lib/neo4j/shared/initialize.rb
neo4j-5.0.9 lib/neo4j/shared/initialize.rb
neo4j-5.0.8 lib/neo4j/shared/initialize.rb
neo4j-5.0.7 lib/neo4j/shared/initialize.rb
neo4j-5.0.6 lib/neo4j/shared/initialize.rb
neo4j-5.0.5 lib/neo4j/shared/initialize.rb
neo4j-5.0.4 lib/neo4j/shared/initialize.rb
neo4j-5.0.3 lib/neo4j/shared/initialize.rb
neo4j-5.0.2 lib/neo4j/shared/initialize.rb
neo4j-5.0.1 lib/neo4j/shared/initialize.rb