It provides easy access methods for navigating the hierarchy, as well as for accessing the nodes.
It also provides the ability to marshal the entire tree structure.
RubyTree aims to provide a simple to use node based model for the conceptual tree, and the ability to extend the model into specialized cases in user-generated code using generic APIs.
Here are some key features of "RubyTree":
· A general purpose node-based tree data structure.
· A binary tree.
What's New in This Release: [ read full changelog ]
· Added new methods to report the degree statistics of a node.
· Added a convenience method alias 'level' to 'nodeDepth'.
· Converted the exceptions thrown on invalid arguments to 'ArgumentError' instead of 'RuntimeError'.
· Converted the documentation to Yard format.
· Added new methods for converting from/to JSON formats.
· Added a separate API-CHANGES documentation file.
· Added fixes for root related edge conditions to 'isOnlyChild?', 'nextSibling', 'previousSibling' and 'remove' methods.
· Removed the 'ChangeLog' file as this can now be generated from the git logs.
· Other minor code cleanup.