Class: RubyXmlNfe::EnderEmit

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(xml, params) ⇒ EnderEmit

Returns a new instance of EnderEmit.



7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/ruby_xml_nfe/ender_emit.rb', line 7

def initialize(xml, params)
  @xml = xml
  @xLgr = params[:xLgr]
  @nro = params[:nro]
  @xCpl = params[:xCpl]
  @xBairro = params[:xBairro]
  @cMun = params[:cMun]
  @xMun = params[:xMun]
  @uf = params[:UF]
  @cep = params[:CEP]
  @cPais = params[:cPais]
  @xPais = params[:xPais]
  @fone = params[:fone]
end

Instance Attribute Details

#cepObject (readonly)

Returns the value of attribute cep.



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

def cep
  @cep
end

#cMunObject (readonly)

Returns the value of attribute cMun.



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

def cMun
  @cMun
end

#cPaisObject (readonly)

Returns the value of attribute cPais.



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

def cPais
  @cPais
end

#foneObject (readonly)

Returns the value of attribute fone.



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

def fone
  @fone
end

#nroObject (readonly)

Returns the value of attribute nro.



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

def nro
  @nro
end

#ufObject (readonly)

Returns the value of attribute uf.



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

def uf
  @uf
end

#xBairroObject (readonly)

Returns the value of attribute xBairro.



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

def xBairro
  @xBairro
end

#xCplObject (readonly)

Returns the value of attribute xCpl.



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

def xCpl
  @xCpl
end

#xLgrObject (readonly)

Returns the value of attribute xLgr.



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

def xLgr
  @xLgr
end

#xmlObject (readonly)

Returns the value of attribute xml.



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

def xml
  @xml
end

#xMunObject (readonly)

Returns the value of attribute xMun.



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

def xMun
  @xMun
end

#xPaisObject (readonly)

Returns the value of attribute xPais.



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

def xPais
  @xPais
end

Instance Method Details

#buildObject



22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/ruby_xml_nfe/ender_emit.rb', line 22

def build
  xml.enderEmit do
    xml.xLgr xLgr
    xml.nro nro
    xml.xCpl xCpl
    xml.xBairro xBairro
    xml.cMun cMun
    xml.xMun xMun
    xml.UF uf
    xml.CEP cep
    xml.cPais cPais
    xml.xPais xPais
    xml.fone fone
  end
end