Sha256: 9cc44b7d58b9bbe506fa268ca1ef347f9f6498cca3ee9176705f58cf04348065
Contents?: true
Size: 364 Bytes
Versions: 14
Compression:
Stored size: 364 Bytes
Contents
# encoding: UTF-8 require 'nokogiri' module Correios module Frete class Parser def servicos(xml) servicos = {} Nokogiri::XML(xml).root.elements.each do |element| servico = Correios::Frete::Servico.new.parse(element.to_xml) servicos[servico.tipo] = servico end servicos end end end end
Version data entries
14 entries across 14 versions & 1 rubygems