Basic tree data structure in Ruby.