Class: BrDanfe::Cce

Inherits:
Object
  • Object
show all
Defined in:
lib/br_danfe/cce.rb

Instance Method Summary collapse

Constructor Details

#initialize(xml) ⇒ Cce

Returns a new instance of Cce.



3
4
5
6
# File 'lib/br_danfe/cce.rb', line 3

def initialize(xml)
  @xml = xml
  @pdf = CceLib::Document.new
end

Instance Method Details

#render_pdfObject



13
14
15
16
# File 'lib/br_danfe/cce.rb', line 13

def render_pdf
  generate
  @pdf.render
end

#save_pdf(filename) ⇒ Object



8
9
10
11
# File 'lib/br_danfe/cce.rb', line 8

def save_pdf(filename)
  generate
  @pdf.render_file filename
end