I still don't understand the necessity of inner vs. regular. It feels like this rubyfy_inner_map duplicates a lot of the code here. Would it not be more straightforward to have a single method that recurses as this does?  If the distinction between inner/outer is still necessary, one could simply pass the desired class into the recursion, with a default at the top.