Class: RubyXmlNfe::AutXml

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_xml_nfe/aut_xml.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(xml, params) ⇒ AutXml

Returns a new instance of AutXml.



5
6
7
8
# File 'lib/ruby_xml_nfe/aut_xml.rb', line 5

def initialize(xml, params)
  @xml = xml
  @cnpj = params[:CNPJ]
end

Instance Attribute Details

#cnpjObject (readonly)

Returns the value of attribute cnpj.



3
4
5
# File 'lib/ruby_xml_nfe/aut_xml.rb', line 3

def cnpj
  @cnpj
end

#xmlObject (readonly)

Returns the value of attribute xml.



3
4
5
# File 'lib/ruby_xml_nfe/aut_xml.rb', line 3

def xml
  @xml
end

Instance Method Details

#buildObject



10
11
12
13
14
# File 'lib/ruby_xml_nfe/aut_xml.rb', line 10

def build
  xml.autXML do
    xml.CNPJ cnpj
  end
end