Sha256: f9a922ad49f0a7666a2de65d4813ae4552985c1fa21c3c9b8a1e16f0c95e5df4
Contents?: true
Size: 800 Bytes
Versions: 3
Compression:
Stored size: 800 Bytes
Contents
module Neo4j::ActiveNode::Initialize extend ActiveSupport::Concern include Neo4j::TypeConverters attr_reader :_persisted_obj # called when loading the node from the database # @param [Neo4j::Node] persisted_node the node this class wraps # @param [Hash] properties of the persisted node. def init_on_load(persisted_node, properties) @_persisted_obj = persisted_node changed_attributes && changed_attributes.clear @attributes = attributes.merge(properties.stringify_keys) self.default_properties=properties @attributes = convert_properties_to :ruby, @attributes end # 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 end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
neo4j-3.0.0.rc.2 | lib/neo4j/active_node/initialize.rb |
neo4j-3.0.0.alpha.11 | lib/neo4j/active_node/initialize.rb |
neo4j-3.0.0.alpha.10 | lib/neo4j/active_node/initialize.rb |