evolve75/RubyTree — pull request #30 by jhamon (2014-10-14 08:52:37+00:00)
Title: Add mixin for Hash conversions

I saw that Issue #13 seems to have stalled for quite a long time. I had some time today to put this together and would like your feedback on it, @evolve75

Everything's organized into a new mixin, `Tree::Utils::HashConverter`. This PR includes:

*Class methods*
- `from_hash`, builds a `Tree::TreeNode` tree from a Ruby hash

*Instance methods*
- `add_from_hash` (somewhat similar to `add` or `<<`, but for use when information for one or more child nodes is present in a `Hash` object).
- `to_h` hash export function.

You'll see I also wrote a good number of assertions to verify functionality.