Class: RubyDanfe::DanfseGenerator

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(xml) ⇒ DanfseGenerator

Returns a new instance of DanfseGenerator.



4
5
6
7
8
# File 'lib/ruby_danfe/danfse_generator.rb', line 4

def initialize(xml)
  @xml = xml
  @pdf = Document.new
  @vol = 0
end

Instance Attribute Details

#municipiosObject (readonly)

Returns the value of attribute municipios.



10
11
12
# File 'lib/ruby_danfe/danfse_generator.rb', line 10

def municipios
  @municipios
end

Instance Method Details

#generatePDFObject



17
18
19
20
21
22
23
24
25
26
# File 'lib/ruby_danfe/danfse_generator.rb', line 17

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