What is RubyTree?

RubyTree is a simple and general purpose implementation of the Tree data structure for the Ruby language. 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 code via generic APIs.

The current version provides implementations of:

RubyTree is available as a rubygem and is released under the BSD License.

What's New?

Version 2.0.3 released on December 27, 2023.

  • Updated documentation to clarify use of create_additions: true while parsing JSON string to tree objects
  • This release supersedes the 2.0.2 release.

Version 2.0.2 released on June 27, 2023.

  • This is a minor release clarifying the license used.
  • Rubytree uses the BSD-2-Clause license.
  • This release fixes and supersedes the 2.0.1 release.

Version 2.0.0 released on June 21, 2022.

  • Removed the dependency on structered_warnings
  • Removed deprecated APIs and updated the predicate method names
  • Significant modernization of the internal code and documentation
  • RubyTree now supports Ruby 2.6+; support for rbx removed
  • Other bug fixes and inclusion of community contributed PRs
See the the Changelog for details.

Installing RubyTree

Download & install the latest version using rubygem (you may need to do this with admin rights):

$ gem install rubytree

Check the documentation for RubyTree by looking up the RDoc using ri, or by browsing the online documentation.

$ ri Tree::TreeNode

Contributing to RubyTree

Help RubyTree with your suggestions, bug reports, or patches and pull requests.