Class: Gerint::Alta
Instance Attribute Summary collapse
-
#cidPrincipal ⇒ Object
Returns the value of attribute cidPrincipal.
-
#conteudo ⇒ Object
Returns the value of attribute conteudo.
-
#cpfMedicoAlta ⇒ Object
Returns the value of attribute cpfMedicoAlta.
-
#dataAlta ⇒ Object
Returns the value of attribute dataAlta.
-
#fileName ⇒ Object
Returns the value of attribute fileName.
-
#identEncaminhamentoPosAlta ⇒ Object
Returns the value of attribute identEncaminhamentoPosAlta.
-
#identMotivoAlta ⇒ Object
Returns the value of attribute identMotivoAlta.
-
#mimeType ⇒ Object
Returns the value of attribute mimeType.
-
#prescricaoAlta ⇒ Object
Returns the value of attribute prescricaoAlta.
-
#protocoloSolicitacao ⇒ Object
Returns the value of attribute protocoloSolicitacao.
-
#resumoInternacao ⇒ Object
Returns the value of attribute resumoInternacao.
Instance Method Summary collapse
-
#all_json ⇒ Object
Gera hash com todas as variaveis de instancia.
- #as_json(options = {}) ⇒ Object
- #to_json(*options) ⇒ Object
Methods inherited from Padrao
Instance Attribute Details
#cidPrincipal ⇒ Object
Returns the value of attribute cidPrincipal.
6 7 8 |
# File 'lib/gerint/servicos/alta.rb', line 6 def cidPrincipal @cidPrincipal end |
#conteudo ⇒ Object
Returns the value of attribute conteudo.
7 8 9 |
# File 'lib/gerint/servicos/alta.rb', line 7 def conteudo @conteudo end |
#cpfMedicoAlta ⇒ Object
Returns the value of attribute cpfMedicoAlta.
5 6 7 |
# File 'lib/gerint/servicos/alta.rb', line 5 def cpfMedicoAlta @cpfMedicoAlta end |
#dataAlta ⇒ Object
Returns the value of attribute dataAlta.
5 6 7 |
# File 'lib/gerint/servicos/alta.rb', line 5 def dataAlta @dataAlta end |
#fileName ⇒ Object
Returns the value of attribute fileName.
7 8 9 |
# File 'lib/gerint/servicos/alta.rb', line 7 def fileName @fileName end |
#identEncaminhamentoPosAlta ⇒ Object
Returns the value of attribute identEncaminhamentoPosAlta.
5 6 7 |
# File 'lib/gerint/servicos/alta.rb', line 5 def identEncaminhamentoPosAlta @identEncaminhamentoPosAlta end |
#identMotivoAlta ⇒ Object
Returns the value of attribute identMotivoAlta.
5 6 7 |
# File 'lib/gerint/servicos/alta.rb', line 5 def identMotivoAlta @identMotivoAlta end |
#mimeType ⇒ Object
Returns the value of attribute mimeType.
7 8 9 |
# File 'lib/gerint/servicos/alta.rb', line 7 def mimeType @mimeType end |
#prescricaoAlta ⇒ Object
Returns the value of attribute prescricaoAlta.
6 7 8 |
# File 'lib/gerint/servicos/alta.rb', line 6 def prescricaoAlta @prescricaoAlta end |
#protocoloSolicitacao ⇒ Object
Returns the value of attribute protocoloSolicitacao.
5 6 7 |
# File 'lib/gerint/servicos/alta.rb', line 5 def protocoloSolicitacao @protocoloSolicitacao end |
#resumoInternacao ⇒ Object
Returns the value of attribute resumoInternacao.
6 7 8 |
# File 'lib/gerint/servicos/alta.rb', line 6 def resumoInternacao @resumoInternacao end |
Instance Method Details
#all_json ⇒ Object
Gera hash com todas as variaveis de instancia
26 27 28 29 30 31 32 33 34 |
# File 'lib/gerint/servicos/alta.rb', line 26 def all_json # Gera hash com todas as variaveis de instancia vinstancia = self.instance_variables h = {} vinstancia.each do |v| h.store(v[1..50], "#{v}") # BUG: v contem o nome da variavel e não o valor int end h h.to_json end |
#as_json(options = {}) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/gerint/servicos/alta.rb', line 9 def as_json(={}) h = { protocoloSolicitacao: @protocoloSolicitacao, dataAlta: @dataAlta, identMotivoAlta: @identMotivoAlta } h.store(:fileName, @fileName) unless @fileName.nil? h.store(:mimeType, @mimeType) unless @mimeType.nil? h.store(:conteudo, @conteudo) unless @conteudo.nil? h.store(:cpfMedicoAlta, @cpfMedicoAlta) unless @cpfMedicoAlta.nil? h.store(:identEncaminhamentoPosAlta, @identEncaminhamentoPosAlta) unless @identEncaminhamentoPosAlta.nil? h.store(:resumoInternacao, @resumoInternacao) unless @resumoInternacao.nil? h.store(:prescricaoAlta, @prescricaoAlta) unless @prescricaoAlta.nil? h.store(:cidPrincipal, @cidPrincipal) unless @cidPrincipal.nil? h end |
#to_json(*options) ⇒ Object
36 37 38 |
# File 'lib/gerint/servicos/alta.rb', line 36 def to_json(*) as_json(*).to_json(*) end |