module Neo4j::ActiveNode::Initialize
Attributes
called_by[R]
Public Instance Methods
init_on_load(persisted_node, properties)
click to toggle source
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.
# File lib/neo4j/active_node/initialize.rb 10 def init_on_load(persisted_node, properties) 11 self.class.extract_association_attributes!(properties) 12 @_persisted_obj = persisted_node 13 changed_attributes && changed_attributes.clear 14 @attributes = convert_and_assign_attributes(properties) 15 end
init_on_reload(reloaded)
click to toggle source
# File lib/neo4j/active_node/initialize.rb 17 def init_on_reload(reloaded) 18 @attributes = nil 19 init_on_load(reloaded, reloaded.props) 20 end