The wrapping process is what transforms a raw CypherNode or EmbeddedNode from Neo4j::Core into a healthy ActiveNode (or ActiveRel) object.
- CONSTANTS_FOR_LABELS_CACHE
#class_to_wrap
ruby
- def class_to_wrap
load_classes_from_labels (named_class || ::Neo4j::ActiveNode::Labels.model_for_labels(labels)).tap do Neo4j::Node::Wrapper.populate_constants_for_labels_cache(model_class, labels) end
end
- #wrapper
this is a plugin in the neo4j-core so that the Ruby wrapper will be wrapped around the Neo4j::Node objects
ruby
- def wrapper
found_class = class_to_wrap return self if not found_class
- found_class.new.tap do
wrapped_node.init_on_load(self, self.props)
end
end