Class: Nfse::Pdf::DanfseGenerator

Inherits:
Object
  • Object
show all
Defined in:
lib/danfe/danfse_generator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(xml) ⇒ DanfseGenerator

Returns a new instance of DanfseGenerator.



18
19
20
21
22
# File 'lib/danfe/danfse_generator.rb', line 18

def initialize(xml)      
  @xml = Nfse::Pdf::XML.new(xml)
  @pdf = Document.new
  @vol = 0
end

Instance Attribute Details

#municipiosObject (readonly)

Returns the value of attribute municipios.



24
25
26
# File 'lib/danfe/danfse_generator.rb', line 24

def municipios
  @municipios
end

Instance Method Details

#generatePDFObject



31
32
33
34
35
36
37
38
39
40
# File 'lib/danfe/danfse_generator.rb', line 31

def generatePDF      
  render_titulo
  render_prestador
  render_tomador
  render_intermediario
  render_discriminacao
  render_valor_total
  render_outras
  return @pdf.render
end