Module: Neo4j::MetaModel::ModelHelper

Defined in:
app/helpers/neo4j/meta_model/model_helper.rb

Instance Method Summary collapse

Instance Method Details

#hierarchical_render(hierarchy, level = 0, &block) ⇒ Object



4
5
6
7
8
9
# File 'app/helpers/neo4j/meta_model/model_helper.rb', line 4

def hierarchical_render(hierarchy, level = 0, &block)
  hierarchy.each do |object, sub_hierarchy|
    block.call object, level
    hierarchical_render(sub_hierarchy, level + 1, &block)
  end
end