Class: BrDanfe::DanfeLib::NfceLib::Header

Inherits:
Object
  • Object
show all
Defined in:
lib/br_danfe/danfe_lib/nfce_lib/header.rb

Instance Method Summary collapse

Constructor Details

#initialize(pdf, xml, logo, logo_dimensions) ⇒ Header

Returns a new instance of Header.



5
6
7
8
9
10
# File 'lib/br_danfe/danfe_lib/nfce_lib/header.rb', line 5

def initialize(pdf, xml, , logo_dimensions)
  @pdf = pdf
  @xml = xml
  @logo = 
  @logo_dimensions = logo_dimensions
end

Instance Method Details

#renderObject



12
13
14
15
16
17
18
19
20
# File 'lib/br_danfe/danfe_lib/nfce_lib/header.rb', line 12

def render
  cursor = @pdf.cursor

  render_company_info
  (cursor) if @logo.present?
  render_doc

  render_homologation if BrDanfe::Helper.homologation?(@xml)
end