Generalize Ruby objects support

Previous commit was supporting only !ruby/object:Puppet::Resource
objects, but that may be useful for any Ruby mapping based object.