Module: BrInvoicesPdf::Cfe::Parser::AccessKey

Extended by:
Util::XmlLocate
Defined in:
lib/br_invoices_pdf/cfe/parser/access_key.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
18
19
# File 'lib/br_invoices_pdf/cfe/parser/access_key.rb', line 11

def execute(xml)
  element = xml.locate('Signature/SignedInfo').first
  return unless element

  element = element.nodes.last
  return unless element

  element.attributes[:URI]
end