RelatedNode

A container for ActiveRel’s :inbound and :outbound methods. It provides lazy loading of nodes. It’s important (or maybe not really IMPORTANT, but at least worth mentioning) that calling method_missing will result in a query to load the node if the node is not already loaded.

Constants

Methods

#==

Loads the node if needed, then conducts comparison.

+ show/hide code

#class

+ show/hide code
#initialize

ActiveRel’s related nodes can be initialized with nothing, an integer, or a fully wrapped node.

Initialization with nothing happens when a new, non-persisted ActiveRel object is first initialized.

Initialization with an integer happens when a relationship is loaded from the database. It loads using the ID because that is provided by the Cypher response and does not require an extra query.

Initialization with a node doesn’t appear to happen in the code. TODO: maybe find out why this is an option.

+ show/hide code
#loaded

Loads a node from the database or returns the node if already laoded

+ show/hide code

#loaded?

+ show/hide code

#method_missing

+ show/hide code
#neo_id

Returns the neo_id of a given node without loading.

+ show/hide code

#respond_to_missing?

+ show/hide code