Add tree data structure in Ruby.