trees data structures in ruby