Class: RubyXmlNfe::Icms

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(xml, params) ⇒ Icms

Returns a new instance of Icms.



7
8
9
10
# File 'lib/ruby_xml_nfe/icms.rb', line 7

def initialize(xml, params)
  @xml = xml
  @icms00_params = params[:ICMS00]
end

Instance Attribute Details

#icms00_paramsObject (readonly)

Returns the value of attribute icms00_params.



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

def icms00_params
  @icms00_params
end

#xmlObject (readonly)

Returns the value of attribute xml.



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

def xml
  @xml
end

Instance Method Details

#buildObject



12
13
14
15
16
17
# File 'lib/ruby_xml_nfe/icms.rb', line 12

def build
  xml.ICMS do
    icms00 = RubyXmlNfe::Icms00.new(xml, icms00_params)
    icms00.build
  end
end