Method: N4j::Node::AutoRelate::ClassMethods#model_root

Defined in:
lib/n4j/auto_relate.rb

#model_rootObject



10
11
12
13
14
15
16
17
# File 'lib/n4j/auto_relate.rb', line 10

def model_root
  # Turned off cache here until I can figure out how to keep this from messing with tests.
  # root = instance_variable_get("@#{model_root_name}")
  # return root if root

  root = follow_path_from_root || create_root_node
  instance_variable_set("@#{model_root_name}", root)
end