6 7 8 9 10 11
# File 'lib/my_data/xml_parser.rb', line 6 def xml_to_resource(xml:, resource:, root: nil) h = transofrm_xml_to_hash(fix_xml(xml)) h = h[root] if root resource.new hash_mapping(h, resource) end