Class: RubyXmlNfe::Dest
- Inherits:
-
Object
- Object
- RubyXmlNfe::Dest
- Defined in:
- lib/ruby_xml_nfe/dest.rb
Instance Attribute Summary collapse
-
#cnpj ⇒ Object
readonly
Returns the value of attribute cnpj.
-
#email ⇒ Object
readonly
Returns the value of attribute email.
-
#ender_dest_params ⇒ Object
readonly
Returns the value of attribute ender_dest_params.
-
#ie ⇒ Object
readonly
Returns the value of attribute ie.
-
#indIEDest ⇒ Object
readonly
Returns the value of attribute indIEDest.
-
#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) ⇒ Dest
constructor
A new instance of Dest.
Constructor Details
#initialize(xml, params) ⇒ Dest
Returns a new instance of Dest.
8 9 10 11 12 13 14 15 16 |
# File 'lib/ruby_xml_nfe/dest.rb', line 8 def initialize(xml, params) @xml = xml @cnpj = params[:CNPJ] @xNome = params[:xNome] @ender_dest_params = params[:enderDest] @indIEDest = params[:indIEDest] @ie = params[:IE] @email = params[:email] end |
Instance Attribute Details
#cnpj ⇒ Object (readonly)
Returns the value of attribute cnpj.
6 7 8 |
# File 'lib/ruby_xml_nfe/dest.rb', line 6 def cnpj @cnpj end |
#email ⇒ Object (readonly)
Returns the value of attribute email.
6 7 8 |
# File 'lib/ruby_xml_nfe/dest.rb', line 6 def email @email end |
#ender_dest_params ⇒ Object (readonly)
Returns the value of attribute ender_dest_params.
6 7 8 |
# File 'lib/ruby_xml_nfe/dest.rb', line 6 def ender_dest_params @ender_dest_params end |
#ie ⇒ Object (readonly)
Returns the value of attribute ie.
6 7 8 |
# File 'lib/ruby_xml_nfe/dest.rb', line 6 def ie @ie end |
#indIEDest ⇒ Object (readonly)
Returns the value of attribute indIEDest.
6 7 8 |
# File 'lib/ruby_xml_nfe/dest.rb', line 6 def indIEDest @indIEDest end |
#xml ⇒ Object (readonly)
Returns the value of attribute xml.
6 7 8 |
# File 'lib/ruby_xml_nfe/dest.rb', line 6 def xml @xml end |
#xNome ⇒ Object (readonly)
Returns the value of attribute xNome.
6 7 8 |
# File 'lib/ruby_xml_nfe/dest.rb', line 6 def xNome @xNome end |
Instance Method Details
#build ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/ruby_xml_nfe/dest.rb', line 18 def build xml.dest do xml.CNPJ cnpj xml.xNome xNome ender_emit = RubyXmlNfe::EnderDest.new(xml, ender_dest_params) ender_emit.build xml.indIEDest indIEDest xml.IE ie if ie xml.email email if email end end |