# File lib/scrubyt/output/result_dumper.rb, line 56 def self.to_hash(pattern) result = [] flat_hash_inner = lambda {|e, parts| content = e.text ? REXML::Text.unnormalize(e.text) : '' if ((e.is_a? REXML::Element) && content != '') if parts[e.local_name] parts[e.local_name] = parts[e.local_name] + "," + content else parts[e.local_name] = content end end e.children.each {|c| flat_hash_inner.call(c, parts) if c.is_a? REXML::Element } parts } to_xml(pattern).root.elements['/root'].each {|e| result << flat_hash_inner.call(e, {}) } result end