Solution for auto loading Ruby classes wrapping nodes, #349

I've tried to make it fast by caching lookup of mappings.

I'm tired now, so it is good if someone else had a look at it.
Not sure this is the best solution.
it tries solves issue #349