module BrInvoicesPdf::Nfce::Renderer::BaseRenderer

Constants

ADDRESS_FORMAT

Public Instance Methods

format_address(address) click to toggle source
# File lib/br_invoices_pdf/nfce/renderer/base_renderer.rb, line 14
def format_address(address)
  ADDRESS_FORMAT % %i(streetname number district city state).map(&address.method(:[]))
end
format_date(date) click to toggle source
# File lib/br_invoices_pdf/nfce/renderer/base_renderer.rb, line 18
def format_date(date)
  Timezone[ENV['INVOICE_TIMEZONE'] || 'America/Sao_Paulo'].utc_to_local(date).strftime('%H:%M:%S %d/%m/%Y')
end