Class: RubyXmlNfe::Emit
- Inherits:
-
Object
- Object
- RubyXmlNfe::Emit
- Defined in:
- lib/ruby_xml_nfe/emit.rb
Instance Attribute Summary collapse
-
#cnae ⇒ Object
readonly
Returns the value of attribute cnae.
-
#cnpj ⇒ Object
readonly
Returns the value of attribute cnpj.
-
#crt ⇒ Object
readonly
Returns the value of attribute crt.
-
#ender_emit_params ⇒ Object
readonly
Returns the value of attribute ender_emit_params.
-
#ie ⇒ Object
readonly
Returns the value of attribute ie.
-
#im ⇒ Object
readonly
Returns the value of attribute im.
-
#xFant ⇒ Object
readonly
Returns the value of attribute xFant.
-
#xml ⇒ Object
readonly
Returns the value of attribute xml.
-
#xNome ⇒ Object
readonly
Returns the value of attribute xNome.
Instance Method Summary collapse
- #build ⇒ Object
-
#initialize(xml, params) ⇒ Emit
constructor
A new instance of Emit.
Constructor Details
#initialize(xml, params) ⇒ Emit
Returns a new instance of Emit.
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/ruby_xml_nfe/emit.rb', line 8 def initialize(xml, params) @xml = xml @cnpj = params[:CNPJ] @xNome = params[:xNome] @xFant = params[:xFant] @ender_emit_params = params[:enderEmit] @ie = params[:IE] @im = params[:IM] @cnae = params[:CNAE] @crt = params[:CRT] end |
Instance Attribute Details
#cnae ⇒ Object (readonly)
Returns the value of attribute cnae.
6 7 8 |
# File 'lib/ruby_xml_nfe/emit.rb', line 6 def cnae @cnae end |
#cnpj ⇒ Object (readonly)
Returns the value of attribute cnpj.
6 7 8 |
# File 'lib/ruby_xml_nfe/emit.rb', line 6 def cnpj @cnpj end |
#crt ⇒ Object (readonly)
Returns the value of attribute crt.
6 7 8 |
# File 'lib/ruby_xml_nfe/emit.rb', line 6 def crt @crt end |
#ender_emit_params ⇒ Object (readonly)
Returns the value of attribute ender_emit_params.
6 7 8 |
# File 'lib/ruby_xml_nfe/emit.rb', line 6 def ender_emit_params @ender_emit_params end |
#ie ⇒ Object (readonly)
Returns the value of attribute ie.
6 7 8 |
# File 'lib/ruby_xml_nfe/emit.rb', line 6 def ie @ie end |
#im ⇒ Object (readonly)
Returns the value of attribute im.
6 7 8 |
# File 'lib/ruby_xml_nfe/emit.rb', line 6 def im @im end |
#xFant ⇒ Object (readonly)
Returns the value of attribute xFant.
6 7 8 |
# File 'lib/ruby_xml_nfe/emit.rb', line 6 def xFant @xFant end |
#xml ⇒ Object (readonly)
Returns the value of attribute xml.
6 7 8 |
# File 'lib/ruby_xml_nfe/emit.rb', line 6 def xml @xml end |
#xNome ⇒ Object (readonly)
Returns the value of attribute xNome.
6 7 8 |
# File 'lib/ruby_xml_nfe/emit.rb', line 6 def xNome @xNome end |
Instance Method Details
#build ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/ruby_xml_nfe/emit.rb', line 20 def build xml.emit do xml.CNPJ cnpj xml.xNome xNome xml.xFant xFant ender_emit = RubyXmlNfe::EnderEmit.new(xml, ender_emit_params) ender_emit.build xml.IE ie xml.IM im if im xml.CNAE cnae if cnae xml.CRT crt end end |