solnic/virtus — pull request #84 by ifesdjeen (2012-04-17 11:31:54+00:00)
Title: Feature/recursive to hash

@solnic, @dkubb Thank you a lot for giving a nice hint about circular dependencies.

I've read through the things @dkubb mentioned, and I understand the concept. Maybe my implementation is not word-by-word similar to what was explained and shown here, but I hope it doesn't get into the pitfalls he mentioned in the article :)

My approach is a bit more clojure-style, and may be a bit over-engineered for a Ruby solution. I'll give it more thought, too, maybe there's a way to simplify it.

I simply persist caller object_ids and exclude them from the child hashes.

Please let me know what you think.