Sha256: 46512ce2f3f6adf20b21889758e1173520189a6753055964754c931431466586
Contents?: true
Size: 333 Bytes
Versions: 4
Compression:
Stored size: 333 Bytes
Contents
# frozen_string_literal: true require 'ox' module Trumail module Parser class Xml < Trumail::Parser::Base 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 end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
trumail-2.0.0 | lib/trumail/parser/xml.rb |
trumail-1.0.0 | lib/trumail/parser/xml.rb |
trumail-0.2.0 | lib/trumail/parser/xml.rb |
trumail-0.1.0 | lib/trumail/parser/xml.rb |