Class: Trumail::Parser::Xml
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Trumail::Parser::Base
Instance Method Details
#parse ⇒ Object
9 10 11 12 13 14 |
# File 'lib/trumail/parser/xml.rb', line 9 def parse @hash = Ox.parse(@data).nodes.each_with_object({}) do |xml, memo| value = xml.nodes.first memo[xml.value] = eval(value) rescue value end end |