Module: Neo4j::ActiveNode::Initialize
- Extended by:
- ActiveSupport::Concern
- Includes:
- Shared::Initialize
- Included in:
- Neo4j::ActiveNode
- Defined in:
- lib/neo4j/active_node/initialize.rb
Instance Attribute Summary collapse
-
#called_by ⇒ Object
readonly
Returns the value of attribute called_by.
Instance Method Summary collapse
-
#init_on_load(persisted_node, properties) ⇒ Object
called when loading the node from the database.
- #init_on_reload(reloaded) ⇒ Object
Methods included from Shared::Initialize
Instance Attribute Details
#called_by ⇒ Object (readonly)
Returns the value of attribute called_by.
5 6 7 |
# File 'lib/neo4j/active_node/initialize.rb', line 5 def called_by @called_by end |
Instance Method Details
#init_on_load(persisted_node, properties) ⇒ Object
called when loading the node from the database
10 11 12 13 14 15 |
# File 'lib/neo4j/active_node/initialize.rb', line 10 def init_on_load(persisted_node, properties) self.class.extract_association_attributes!(properties) @_persisted_obj = persisted_node changed_attributes_clear! @attributes = convert_and_assign_attributes(properties) end |
#init_on_reload(reloaded) ⇒ Object
17 18 19 20 |
# File 'lib/neo4j/active_node/initialize.rb', line 17 def init_on_reload(reloaded) @attributes = nil init_on_load(reloaded, reloaded.props) end |