Module: BrInvoicesPdf::Cfe::Parser::Payments

Extended by:
Util::XmlLocate
Defined in:
lib/br_invoices_pdf/cfe/parser/payments.rb

Class Method Summary collapse

Methods included from Util::XmlLocate

locate_element, node_locate, root_path

Class Method Details

.execute(xml) ⇒ Object



11
12
13
14
15
16
17
# File 'lib/br_invoices_pdf/cfe/parser/payments.rb', line 11

def execute(xml)
  node_payments = xml.locate('infCFe/pgto')

  return unless node_payments

  payments_by_nodes(node_payments) if node_payments.any?
end