Created
August 20, 2018 22:33
-
-
Save brunoandradd/f5a0c33a1163cd18d1180dc8bc59da11 to your computer and use it in GitHub Desktop.
odontograma
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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