module ActiveGraph::Node::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 [ActiveGraph::Node] persisted_node the node this class wraps @param [Hash] properties of the persisted node.

   # File lib/active_graph/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_clear!
14   @attributes = convert_and_assign_attributes(properties)
15 end
init_on_reload(reloaded) click to toggle source
   # File lib/active_graph/node/initialize.rb
17 def init_on_reload(reloaded)
18   @attributes = nil
19   init_on_load(reloaded, reloaded.properties)
20 end