Method: Katalyst::Content::HasTree#tree

Defined in:
app/models/concerns/katalyst/content/has_tree.rb

#treeObject

Constructs a tree from an ordered list of items with depth.

* items that have higher depth than their predecessor are nested as `children`.
* items with the same depth become siblings.


9
10
11
# File 'app/models/concerns/katalyst/content/has_tree.rb', line 9

def tree
  items.reduce(Builder.new, &:add).tree
end