Class: RubyXmlNfe::Cofins
- Inherits:
-
Object
- Object
- RubyXmlNfe::Cofins
- Defined in:
- lib/ruby_xml_nfe/cofins.rb
Instance Attribute Summary collapse
-
#cofins_aliq_params ⇒ Object
readonly
Returns the value of attribute cofins_aliq_params.
-
#cofins_outr_params ⇒ Object
readonly
Returns the value of attribute cofins_outr_params.
-
#xml ⇒ Object
readonly
Returns the value of attribute xml.
Instance Method Summary collapse
- #build ⇒ Object
-
#initialize(xml, params) ⇒ Cofins
constructor
A new instance of Cofins.
Constructor Details
#initialize(xml, params) ⇒ Cofins
Returns a new instance of Cofins.
8 9 10 11 12 |
# File 'lib/ruby_xml_nfe/cofins.rb', line 8 def initialize(xml, params) @xml = xml @cofins_aliq_params = params[:COFINSAliq] @cofins_outr_params = params[:COFINSOutr] end |
Instance Attribute Details
#cofins_aliq_params ⇒ Object (readonly)
Returns the value of attribute cofins_aliq_params.
6 7 8 |
# File 'lib/ruby_xml_nfe/cofins.rb', line 6 def cofins_aliq_params @cofins_aliq_params end |
#cofins_outr_params ⇒ Object (readonly)
Returns the value of attribute cofins_outr_params.
6 7 8 |
# File 'lib/ruby_xml_nfe/cofins.rb', line 6 def cofins_outr_params @cofins_outr_params end |
#xml ⇒ Object (readonly)
Returns the value of attribute xml.
6 7 8 |
# File 'lib/ruby_xml_nfe/cofins.rb', line 6 def xml @xml end |
Instance Method Details
#build ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/ruby_xml_nfe/cofins.rb', line 14 def build xml.COFINS do if cofins_aliq_params cofins_aliq = RubyXmlNfe::CofinsAliq.new(xml, cofins_aliq_params) cofins_aliq.build end if cofins_outr_params cofins_outr = RubyXmlNfe::CofinsOutr.new(xml, cofins_outr_params) cofins_outr.build end end end |