Sha256: 96d080c75be13bc375109f0577b2124b3516d1a574d59e71e945c02794b95d01

Contents?: true

Size: 459 Bytes

Versions: 2

Compression:

Stored size: 459 Bytes

Contents

module BrDanfe
  module DanfeNfceLib
    class Key
      def initialize(pdf, xml)
        @pdf = pdf
        @xml = xml
      end

      def render
        @pdf.render_blank_line

        @pdf.text 'Consulte pela Chave de Acesso em', size: 7, align: :center, style: :bold
        @pdf.text @xml['urlChave'], size: 7, align: :center
        @pdf.text @xml['chNFe'].gsub(/(\d)(?=(\d\d\d\d)+(?!\d))/, '\\1 '), size: 6, align: :center
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
br_danfe-0.12.1 lib/br_danfe/danfe_nfce_lib/key.rb
br_danfe-0.12.0 lib/br_danfe/danfe_nfce_lib/key.rb