Sha256: db55b5d115313aa205152d92f76fcc6ca3a2d4d5ee96ef17d18545ab54eafdd2
Contents?: true
Size: 372 Bytes
Versions: 3
Compression:
Stored size: 372 Bytes
Contents
# encoding: UTF-8 require 'nokogiri' module Correios module SRO class Parser def objetos(xml) objetos = {} doc = Nokogiri::XML(xml) doc.xpath("//objeto").each do |element| objeto = Correios::SRO::Objeto.parse(element.to_xml) objetos[objeto.numero] = objeto end objetos end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
correios-sro-xml-0.0.3 | lib/correios/sro/parser.rb |
correios-sro-xml-0.0.2 | lib/correios/sro/parser.rb |
correios-sro-xml-0.0.1 | lib/correios/sro/parser.rb |