Method: Sequel::Plugins::Tree::DatasetMethods#roots
- Defined in:
- lib/sequel/plugins/tree.rb
#roots ⇒ Object
Returns list of all root nodes (those with no parent nodes).
TreeClass.roots # => [root1, root2]
151 152 153 |
# File 'lib/sequel/plugins/tree.rb', line 151 def roots roots_dataset.all end |