Sha256: ff84923a9e06247af7ea2bf9b9b81f0fdd5dd8ebd6b63b53028b650010e2fcf4

Contents?: true

Size: 806 Bytes

Versions: 6

Compression:

Stored size: 806 Bytes

Contents

# frozen_string_literal: true

module BrInvoicesPdf
  module Nfce
    module Renderer
      module ProconInfo
        extend Util::BaseRenderer
        extend BaseRenderer

        module_function

        def execute(pdf, data)
          procon_message = data[:additional_variables][:procon_message]

          return if ['', nil].include? procon_message

          box(pdf, [0, pdf.cursor], page_content_width(pdf)) do
            procon_message(pdf, procon_message)
          end
        end

        # :reek:FeatureEnvy
        def procon_message(pdf, message)
          pdf.text("Mensagem de Interesse do Contribuente:\n\n", style: :italic)
          text = "#{message}\n\n"
          pdf.text(text, align: :center)
        end
        private_class_method :procon_message
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
br_invoices_pdf-0.2.24 lib/br_invoices_pdf/nfce/renderer/procon_info.rb
br_invoices_pdf-0.2.23 lib/br_invoices_pdf/nfce/renderer/procon_info.rb
br_invoices_pdf-0.2.22 lib/br_invoices_pdf/nfce/renderer/procon_info.rb
br_invoices_pdf-0.2.21 lib/br_invoices_pdf/nfce/renderer/procon_info.rb
br_invoices_pdf-0.2.20 lib/br_invoices_pdf/nfce/renderer/procon_info.rb
br_invoices_pdf-0.2.19 lib/br_invoices_pdf/nfce/renderer/procon_info.rb