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.1.1 released on December 19, 2024.

  • Updated all dependencies to their latest, stable versions.
  • Fixes for the from_hash method.

Version 2.1.0 released on August 12, 2024.

  • Updated all dependencies to their latest, stable versions.
  • Rubytree now requires Ruby 2.7 or above. Ruby 2.6 is no longer supported.

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.

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.