class NFe::EnderecoEmitente
Constants
- CEP
- UF
Attributes
CEP[RW]
UF[RW]
cMun[RW]
cPais[RW]
fone[RW]
nro[RW]
xBairro[RW]
xCpl[RW]
xLgr[RW]
xMun[RW]
xPais[RW]
Public Class Methods
new(attrs = {})
click to toggle source
# File lib/nfe/entidades/infNFe/emit/endereco_emitente.rb, line 17 def initialize(attrs = {}) self.xLgr = attrs[:xLgr] self.nro = attrs[:nro] self.xCpl = attrs[:xCpl] self.xBairro = attrs[:xBairro] self.cMun = attrs[:cMun] self.xMun = attrs[:xMun] self.UF = attrs[:UF] self.CEP = attrs[:CEP] self.cPais = attrs[:cPais] self.xPais = attrs[:xPais] self.fone = attrs[:fone] end
Public Instance Methods
attributes()
click to toggle source
# File lib/nfe/entidades/infNFe/emit/endereco_emitente.rb, line 31 def attributes @attributes = { "xLgr" => xLgr, "nro" => nro, "xCpl" => xCpl, "xBairro" => xBairro, "cMun" => cMun, "xMun" => xMun, "UF" => UF, "CEP" => CEP, "cPais" => cPais, "xPais" => xPais, "fone" => fone } end
attributes=(params)
click to toggle source
# File lib/nfe/entidades/infNFe/emit/endereco_emitente.rb, line 47 def attributes=(params) self.xLgr = params[:xLgr], self.nro = params[:nro], self.xCpl = params[:xCpl], self.xBairro = params[:xBairro], self.cMun = params[:cMun], self.xMun = params[:xMun], self.UF = params[:UF], self.CEP = params[:CEP], self.cPais = params[:cPais], self.xPais = params[:xPais], self.fone = params[:fone] end
xml_to_hash(xml)
click to toggle source
# File lib/nfe/entidades/infNFe/emit/endereco_emitente.rb, line 61 def xml_to_hash(xml) #node XML xml.children.css('enderEmit').each do |p| self.xLgr = p.css('xLgr').text self.nro = p.css('nro').text self.xCpl = p.css('xCpl').text self.xBairro = p.css('xBairro').text self.cMun = p.css('cMun').text self.xMun = p.css('xMun').text self.UF = p.css('UF').text self.CEP = p.css('CEP').text self.cPais = p.css('cPais').text self.xPais = p.css('xPais').text self.fone = p.css('fone').text end self end