Skip to content

Instantly share code, notes, and snippets.

@brunoandradd
Created August 20, 2018 22:33
Show Gist options
  • Save brunoandradd/f5a0c33a1163cd18d1180dc8bc59da11 to your computer and use it in GitHub Desktop.
Save brunoandradd/f5a0c33a1163cd18d1180dc8bc59da11 to your computer and use it in GitHub Desktop.
odontograma
class OndontogramaNulo
attr_reader :codigo_dente, :regiao_boca, :face
def initialize
@codigo_dente = 0
@regicao_boca = ''
@face = ''
end
end
class Ondontograma
attr_reader :codigo_dente, :regiao_boca, :face
def initialize(atributos)
if atributos.present?
@codigo_dente = atributos[:dente]
@regiao_boca = atributos[:face]
@face = atributos[:face]
else
OndontogramaNulo.new
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment