module BrInvoicesPdf::Cfe::Parser::FiscoObs

Public Instance Methods

execute(xml) click to toggle source
# File lib/br_invoices_pdf/cfe/parser/fisco_obs.rb, line 11
def execute(xml)
  xml.locate('infCFe/infAdic/obsFisco').map do |element|
    node = element.nodes.first
    field = element.attributes[:xCampo]
    next unless node && field

    {
      text: node.text,
      field: field
    }
  end
end