Class: KewegoParty::ParseXml
- Inherits:
-
HTTParty::Parser
- Object
- HTTParty::Parser
- KewegoParty::ParseXml
- Defined in:
- lib/kewego_party/parse_xml.rb
Instance Method Summary collapse
Instance Method Details
#parse ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/kewego_party/parse_xml.rb', line 6 def parse xml_parsed = ::MultiXml.parse(body) case xml_parsed when Hash ::Hashie::Rash.new(xml_parsed) when Array xml_parsed.map { |item| item.is_a?(Hash) ? ::Hashie::Rash.new(item) : item } else xml_parsed end end |